Question about the expiration time in memcached mode
I was reviewing the protocol here, and had a question about the expiration time. It seems as though you have three options:
1. Pass in the absolute time_t value that the stored data should expire (in server time).
2. Pass in 0, which means that the data will more or less live indefinitely (or until an untimely asteroid strike, or out of memory, whichever comes first).
3. Pass in the number of seconds that the data should live.
This all makes sense for the 'set' or 'add' commands, but let's say you've already added data and now you want to update existing data, but still maintain the original expiration time? Unless I'm missing something, there doesn't seem to be a command for something like:
replace mykey 0 -1 9\r\n
0 == flags
-1 == expiration time (-1 might mean, use original expiration)
9 == data block length.
Is there any other way to obtain from the server when an existing key will expire?