Last active
May 22, 2017 18:15
-
-
Save inawrath/973f04152319e72b1ac32e0530c0afce to your computer and use it in GitHub Desktop.
Delete all keys from a regular expression in redis
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
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