Is memcached a good way to store session share ammong web servers?

Evert|Rooftop evertpot at gmail.com
Mon Nov 13 04:13:24 UTC 2006


The best possible situation is:

* don't let sessions expire
* only update memcached and the database when session information is 
updated (so record what the sessiondata was on the beginning of the script)
* read session data from memcached.. if it isn't there, use the database

But yea.. this will only work for non-expiring sessions. If you need 
your sessions to timeout in a while, its harder because you need to keep 
updating the databaseserver with the last request time..

Evert

howard chen wrote:
> Anyone used memcached to store sessions?
>
> Are there any special thing need to take care of? e.g. session expire?
>
> Thanks.
>


More information about the memcached mailing list