Skip to content

Instantly share code, notes, and snippets.

@dormando
Created October 6, 2011 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dormando/1268659 to your computer and use it in GitHub Desktop.
Save dormando/1268659 to your computer and use it in GitHub Desktop.
delete+expire
set foo -> hi
-> (stored)
get foo
-> hi
delete foo 10
-> (deleted)
get foo
-> (miss)
add foo -> hi
-> (not_stored)
------------------------
NEW:
set foo2 -> hi
-> (stored)
get foo2
-> hi
set foo2 +flags -> NULL
-> (stored)
get foo2
-> NULL (treated as a miss)
add foo2 -> hi
-> (not_stored)
^ or, note that "get foo2" above came back with a special flag, and never run the set command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment