in reply to Saving XS-objects to memcached
What do you mean by XS object? Objects created by XS code are no different than objects create by Perl code if they are visible to Perl.
And if you're talking about something that's not visible to Perl, then Perl can't help you.
Unfortunately, the beef of LibXML objects is not visible to Perl.
You could convert the LibXML objects to XML and store that in the cache. The objects need to be serialized anyway, so why not serialize them to XML.
# Store into cache $cache->set( xml => $xml_doc->toString() ); # Fetch from cache my $xml_doc = XML::LibXML->new()->parse_string( $cache->get( 'xml' ));
Update: Added possible solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Saving XS-objects to memcached
by KSURi (Monk) on Jul 21, 2009 at 20:23 UTC | |
by ikegami (Patriarch) on Jul 21, 2009 at 20:41 UTC |