refreshing the cache time of a key

Sean Chittenden sean at
Wed Feb 27 19:42:59 UTC 2008

>    is it possible to refresh the cache time of a key with out having  
> to retrieving the cached data and storing it back in memcache .. for  
> example if a data is cached for
> 1 hour and  at the 50th minute from the time this data has been   
> cached i want to   store it in the cache for  1  more  hour  
> there a  function  to  refresh the cache time by knowing the key of  
> data with out having to do get and set
> i.e
> data=mc.get(key)
> mc.set(key,data,3600) # 1 more  hour

It's not possible with the current code base.  I posted a patch a few  
years back that did this....  here we go:

It should be easy to apply the patch by hand if it fails to apply  
cleanly out of the gate.  FWIW, I find this functionality invaluable.   
See the post for details.  -sc

Sean Chittenden
sean at

More information about the memcached mailing list