Skip to content
cheatsheet
home
/
cv
/
weblog
/
cheatsheet
/
proxy
/
vpn
/
status
/
links
EN
RU
☾
New version available
reload
×
cheatsheet
/
redis
/
Flush database
Flush database
redis
Delete all keys in current DB asynchronously
redis-cli -h redis FLUSHDB ASYNC
⎘ copy
#redis
more redis
all 32 commands →
Save snapshot (BGSAVE)
redis-cli -h redis BGSAVE
Check replication info
redis-cli -h redis INFO replication
Scan keys by pattern
redis-cli -h redis --scan --pattern 'session:*' | head -20
TTL of a key
redis-cli -h redis TTL <key>
Monitor real-time commands
redis-cli MONITOR | grep -v PING