Created
August 21, 2019 08:07
-
-
Save Neoglyph/aefc3830596e6d630655b22dffa79272 to your computer and use it in GitHub Desktop.
REDIS delete keys by pattern
This file contains hidden or 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
Lets say your keys start with `sync:` | |
Removes the whole key store | |
redis-cli --scan --pattern sync:* | xargs redis-cli del | |
Removes the key store for a specific parameter | |
redis-cli --scan --pattern sync:PARAMETER | xargs redis-cli del |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment