Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXPIRE on existing key does not work as described #107

Closed
hikeonpast opened this issue Mar 13, 2012 · 1 comment
Closed

EXPIRE on existing key does not work as described #107

hikeonpast opened this issue Mar 13, 2012 · 1 comment

Comments

@hikeonpast
Copy link

http://www.redis.io/topics/expire

"Trying to call EXPIRE against a key that already has an associated timeout will not change the timeout of the key, but will just return 0."

Unfortunately, it turns out that this statement is incorrect--EXPIRE on an existing key replaces the prior TTL with the TTL argument from the EXPIRE command.

Redis 2.4.8:

redis db2:6381[2]> setex test 20 asdf
OK
redis db2:6381[2]> ttl test
(integer) 19
redis db2:6381[2]> expire test 60
(integer) 1
redis db2:6381[2]> ttl test
(integer) 59

@badboy
Copy link
Contributor

badboy commented Mar 23, 2015

Does not apply anymore.

@badboy badboy closed this as completed Mar 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants