Saturday, October 10, 2015

delete client connections in redis using lua

Here are Lua script run in redis 2.6

>eval " local str_tmp = redis.call('client', 'list') for k,v in string.gmatch(str_tmp, '(addr)=(IP:%d+)') do redis.call('client', 'kill', v) end return" 0
>script flush

No comments: