The client serialization object of Perl memcached adopts the nfreeze method of the storable module, which calls the C extended do_store method. The deserialization uses the thaw method of the storable module, this method is the do_retrieve method of the c extension called.
In PHP, The serialize and unserialize operations are performed. Results that cannot be normally read.
Perl stores references to an array ('A', 'C,
The command line returns the following results:
You can use the binary editor to view the storage results as follows:
In PHP, The memcache client gzuncompress and unserialize functions can obtain the stored data and print it out, as shown in:
The result is the same as that shown in the preceding binary editor.
Memcached official documentation: http://code.google.com/p/memcached/wiki/FAQ
As mentioned in
We can see that accessing memcached from clients in different languages is caused by Object serialization.AlgorithmInconsistency, resulting in Direct Reading and parsing.
A better solution is to store and read data using common formats such as JSON and yaml, call services, or use cross-language platforms such as thrift and gearman.
But is there any way to directly access existing data?
Perl can be installed in PHP serialize and unserialize in Perl module to achieve the same serialization as PHP, the specific solution to participate in the peak of the blog: http://www.jeftom.com /? P = 212 # respond.