1

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?

1 Answer 1

4

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**][2].

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.