New feature: refresh [patch]...

Sean Chittenden sean at chittenden.org
Thu Nov 25 23:21:15 PST 2004


>> That said, I've added a new command to memcached(8) called "refresh".
>> refresh behaves *exactly* the same as get, except that it refreshes 
>> the
>> expiration of the item based off of the original expiration time
>> provided by the client.
>
> Isn't this strikingly similar (identical?) in function to my request 
> for
> addition of "touch"?

*goes to check the archives*  Yup, they're very similar.  The 
difference being touch refreshes the expiration time without actually 
fetching the data, where as "refresh" actually fetches the data.

> Or have I missed something?

Nope, basically it's the same thing.  Having a touch command that 
didn't fetch the data, but reset its expiration would be useful, IMHO.

> http://lists.danga.com/pipermail/memcached/2004-October/000789.html
>
> I agree that the Subject: header was misleading, but I wasn't sure of
> how else one might use a "refresh" / "touch" command.  But refreshing
> sessions like you describe is actually using memcached as a second 
> level
> cache, isn't it? :-) The primary cache being the session object in the
> server.

Depends on how you write your session bits, but for all intents and 
purposes, yes.  -sc

-- 
Sean Chittenden



More information about the memcached mailing list