Skip to content

Instantly share code, notes, and snippets.

@positiveque
Forked from rahul286/redis.md
Created May 2, 2023 23:50
Show Gist options
  • Save positiveque/f8865f6fb01aef665422b62ba1edf766 to your computer and use it in GitHub Desktop.
Save positiveque/f8865f6fb01aef665422b62ba1edf766 to your computer and use it in GitHub Desktop.
Useful redis cli commands

Redis Keys Count by Group (namespace)

redis-cli KEYS "*" | awk -F: '{print $1'} | sort | uniq -c

Count WordPress transient

redis-cli KEYS "*" | grep ":transient:" | wc -l

Display WordPress transient

redis-cli KEYS "*" | grep ":transient:" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment