Skip to content

Instantly share code, notes, and snippets.

@rjmurillo
Created March 26, 2016 01:53
Show Gist options
  • Save rjmurillo/d8ea44b0b58176677839 to your computer and use it in GitHub Desktop.
Save rjmurillo/d8ea44b0b58176677839 to your computer and use it in GitHub Desktop.
LUA script to expire multiple keys in Redis by pattern
EVAL "for i, name in ipairs(redis.call('KEYS', 'user:*')) do redis.call('expire', name, 0); end" 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment