Redis批量按前缀删除key

EVAL "local keys = redis.call('keys', ARGV[1]) \n for i=1,#keys,5000 do \n redis.call('del', unpack(keys, i, math.min(i+4999, #keys))) \n end \n return keys" 0 *

 

Leave a Reply

Your email address will not be published. Required fields are marked *