Skip to content

Instantly share code, notes, and snippets.

@yusufhm
Last active Mar 1, 2022
Embed
What would you like to do?
redis commands
# Get info.
redis-cli INFO
# DB size.
redis-cli DBSIZE
# Get real-time stats.
redis-cli --stat
# Monitor.
redis-cli MONITOR
# Get list of all keys.
redis-cli --scan --pattern '*'
# Get list of keys by pattern.
redis-cli --scan --pattern laravel_database_*
# Delete list of keys by pattern.
redis-cli --scan --pattern laravel_database_* | xargs redis-cli unlink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment