php sessions and memcache
lists at cyberlot.net
Mon Jul 17 21:29:40 UTC 2006
The problem is extra overhead, no matter what you do serialize and
unserialize are called.
So on a read you have to serialize the data even though its already in a
user format, on write you have to unserialize the input to your write
Thats 2 serializes called that shouldn't be needed if you could disable
the sessions serializer.
That little overhead was enough that in my tests it wasn't really worth it.
Richard Thomas - CEO
Cyberlot Technologies Group Inc.
507.398.4124 - Voice
> On Mon, 2006-07-17 at 08:11 -0500, Richard Thomas wrote:
>>Currently the php user sessions would require everything be stored as a
>>single serialized value, which could be pretty big.
>>A customized extension could store each value as individual keys and use
>>setters and getters to manage those values.
>>This would allow you to only update keys that have changed instead of a
>>large serialized session value.
> I have written a PHP5 session handler that does this in PHP code (no C
> extension) using mysql for storage -- minor modifications would make it
> use memcached instead. It is not publicly available, but I will prepare
> it for public consumption tonight. If you want it, shoot me an email at
> abakun (same domain this email came from) and I'll email you after it's
More information about the memcached