Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

redis delete keys that match pattern

redis-cli --scan --pattern users:* | xargs redis-cli del

# Or if you have a cluster:
redis-cli --scan --pattern users:* | xargs -L redis-cli -c del
 
PREVIOUS NEXT
Tagged: #redis #delete #keys #match #pattern
ADD COMMENT
Topic
Name
4+7 =