Created
December 7, 2011 22:21
-
-
Save morten/1445004 to your computer and use it in GitHub Desktop.
Redis expiry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis> lpush foo 1 | |
(integer) 1 | |
redis> lpush foo 2 | |
(integer) 2 | |
redis> lpush foo 3 | |
(integer) 3 | |
redis> lpop foo | |
"3" | |
redis> llen foo | |
(integer) 2 | |
redis> expire foo 400 | |
(integer) 1 | |
redis> llen foo | |
(integer) 2 | |
redis> lpop foo | |
(nil) | |
redis> llen foo | |
(integer) 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment