This is an opinion that depends heavily on what is in your session and
how much cache you have to dedicate to it. I keep sessions in memory,
but I am not doing anything that is catastrophic if someone gets logged
out and I keep my evictions graphs like this:
http://screencast.com/t/tJckwBaj0ND
If you put things in sessions, like the status of multiple step
processes or shopping cart data, it could mean a loss of revenue to you
if your user has to log in again or loses their shopping cart.
Brian.
http://brian.moonspot.net
On 3/19/12 11:13 AM, 陈 宗志 wrote:
It's a good idea to store session in Memcached. Session doesn't like
other data. If you lose your sessions, You just need let your user login
again. And Session is used frequently in web application, so it better
to store session in cache than in file. So you need to do is run
memcached whit -m to limit the memory.
--
Blog: http://www.chenzongzhi.info
Twitter: https://twitter.com/baotiao <https://twitter.com/#%21/baotiao>
Git: https://github.com/baotiao
On 2012-3-19, at 下午11:03, Gonzalo de Pedro wrote:
On Mon, Mar 19, 2012 at 12:00 PM, Lokrain <[email protected]
<mailto:[email protected]>> wrote:
Please note the difference between a cache and a datastore before
making the decision to use memcached.
Memory is way faster then DB storage.
That's the whole point of having memcached.
Regards
You are right on memory being faster than disk. But memcached is an on
memory cache it is not an on memory datastore. I was trying to point
out the difference between a cache and a store, independiently of the
speed and storage medium.