[wp-hackers] WordPress Transients API

Pete Mall pete at jointforcestech.com
Sat Jan 2 19:55:44 UTC 2010


I'm having a problem with the WordPress transients API. I'm trying to save a
SimpleXMLElement Object and I don't think it is being stored properly. Am I
missing something or is there a problem handling SimpleXMLElement Objects?


   1. print_r <http://www.php.net/print_r>( $record ); // ==>
   SimpleXMLElement Object ( [name] => www [data] => 111.111.111.111 [ttl] =>
   86400 [aux] => 0 [id] => 111111 [zone-id] => 111111 [record-type] => A
   [active] => Y )
   2. set_transient( 'my_transient_001', $record, 60*2 );
   3. print_r <http://www.php.net/print_r>( get_transient(
   'my_transient_001' ) ); // ==> SimpleXMLElement Object ( )


More information about the wp-hackers mailing list