I'm interacting with Redis through PHPRedis (actually a higher level wrapper built around PHPRedis). I want to update a key and reset it in the database, but the TTL should be reset to the original value at the current point in the program my Class doesn't know what the original TTL.
So say the original TTL was 12 hours. I want to do something like this:
redis->get($key)
$original_ttl = // figure it out
$new_value = something
redis->set($key, $new_value, $original_ttl)
Then we end up with the original key referencing a new value and another 12 hours ttl. Is this possible?