Skip to content

Instantly share code, notes, and snippets.

@cararemixed
Created March 17, 2011 23:09
Show Gist options
  • Save cararemixed/875335 to your computer and use it in GitHub Desktop.
Save cararemixed/875335 to your computer and use it in GitHub Desktop.
Just some ideas for making Redis MULTI/EXEC much more powerful
WATCH key Watch should still work
[regular ops] ...
MULTI Multi call to create more interesting operations
SADD foo bar Basic mutation. No interesting result.
SMEMBERS foo Pulls members of the set... usually returned to client but not here
SORT @2 DESC LIMIT 10 GET qux_* GET # Does a sort on the 2nd multi command's result
COPY @3 stuff Copy one key to another. One way to save multi results directly
EXEC @3 Executes but only returns 3rd bulk result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment