Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Implementing MDEL in Redis
--!/usr/bin/env lua
local delpattern = KEYS[1]
local count = 0
local valuelist = redis.call('keys', delpattern)
if valuelist then
for i = 1, #valuelist do
redis.call('del', valuelist[i])
count = count + 1
end
end
return count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment