allen8807 / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Enhancement #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First off, I'd like to say I love your work. I use Memcached (and the PHP 
module for it) on my website. but, there are two functions/features missing 
that I would like to see in a future release:

int Memcached::getExpire(string key)

This will return a signed integer for the expiration of a given key;
zero meaning indefinite and -1 upon failure.

--AND--

bool Memcached::setExpire(string key, int seconds)

this function could be used to modify the expiration of a given key.

if seconds is zero, then the cached resource would be indefinite.

if seconds is positive, then the cached resource would be cached for that 
amount of time.

if seconds is negative, then the cached resource would subtract it's current 
expiration by that amount (remaining time <= 0 deletes the resource)

it would return TRUE upon success and FALSE on failure.

Thank you for your consideration.
William "Xyphos" Scott

Original issue reported on code.google.com by TheGreat...@gmail.com on 6 Nov 2011 at 10:15

GoogleCodeExporter commented 9 years ago
You can mostly do this with the touch command, which is probably as close as 
you're going to get. With touch you can change the absolute expiration time (or 
by setting it to 0, change it to not expire). I'm not positive that making it 
more complex than that makes any real problem easier.

Original comment by dorma...@rydia.net on 10 Nov 2011 at 6:59

GoogleCodeExporter commented 9 years ago
forgot to close this.

Original comment by dorma...@gmail.com on 15 Nov 2011 at 5:03