scope at planetavent.de
Sat Sep 29 09:13:11 UTC 2007
Dustin Sallings wrote:
> If there are updates, why not either insert a new value, or just do a
> direct invalidation?
Maybe the the expiration time is the data to update?
This feature could be useful for me in the following way:
Store a user's session (from php) in memcached. It's rather time
consuming to create the data stored in the session. Set the expiration
to, say, 600 seconds. Now each time the user clicks and loads a new
page, the session is set again to survive 600 seconds. This way the
session could be kept alive as long as the user is active.
I would not want to recreate the whole session data each click, but just
to make it live a little longer.
What do you think about that?
Of course, I just could make the session live without any time
restrictions and save another value in memcached which is then updated
Or I could read the cached data, tweak it a little (if it is an php
array, e.g. just write to a single array element) and store it again
with a new timeout without recreating things completely.
More information about the memcached