Skip to content

Instantly share code, notes, and snippets.

@inawrath
Last active May 22, 2017 18:15
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 inawrath/973f04152319e72b1ac32e0530c0afce to your computer and use it in GitHub Desktop.
Save inawrath/973f04152319e72b1ac32e0530c0afce to your computer and use it in GitHub Desktop.
Delete all keys from a regular expression in redis
eval "local _prefix = ARGV[1];\nlocal _keys = redis.call('keys', _prefix);\nfor i, _key in ipairs(_keys) do\n redis.call('del', _key);\nend" 0 REGEX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment