开发者

How arrays stores in memcache via php-function Memcache::set()?

Does it use php function开发者_运维百科 serialize() or some internal function of memcache extension? If it uses serialize(), then I can serialize my data myself with json_encode, for example. Will it be faster?


The documentation of Memcache::set says (quoting) :

Strings and integers are stored as is, other types are stored serialized.

So I'm guessing it uses serialize internally ;-)


A good way to speed up the serialization/deserialization process would be to replace the internal default PHP serializer with something like igbinary.

There are a couple of notes about that in theses slides presented by Ilia Alshanetsky a couple of weeks ago at the Forum PHP 2010 in Paris : APC & Memcached the High Performance Duo

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜