Created
May 21, 2022 18:31
-
-
Save aptxx/9476bca6b8083a0eee84dfc4af572b4b to your computer and use it in GitHub Desktop.
redis operations
This file contains 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
# delete keys | |
redis-cli --scan --pattern users:* | xargs redis-cli unlink | |
# expire keys after 600 seconds | |
redis-cli --scan --pattern users:* | xargs -L1 -I{} redis-cli expire {} 600 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment