> Hi,
>
> I'm developing some applications using memcached and I saw that the
> incr operation does not update the key's expiration, requiring the
> usage of get + set if I want to update the expiration.
>
> Is there a special reason to this behavior?

It's more flexible if that's the default. you can use touch to
periodically extend the expiration if necessary. Since memcached is an LRU
you can simply set the expiration time to something reasonable and let
unused keys get pushed out as they would otherwise.

With fixed expiration times you can do things like rate limits that
automatically roll over every minute, etc.

Reply via email to