Redis Command
- Delete key batch
redis-cli -a passwordRedis--scan --pattern "pencapaian|user*" |xargs -L 1 redis-cli -a password del
- Delete key batch
redis-cli -a passwordRedis --scan --pattern "*list|category*" |xargs -L 1 redis-cli -a passwordRedis del
- Put key on file
redis-cli -a pass --raw keys "*d|res|category|master*" >> test.log
- Config maxmemory, maxclient, timeout
#timeout, default 0 (no timeout)
config get timeout
config set timeout 300
#maxmemory, default infinity
config get maxmemory
config set maxmemory 3GB
#maxclient, defaul 10000
config get maxclients
config set maxclients 20000
config get *
- Supress redis-cli auth warning
redis-cli --no-auth-warning
#use another db than 0 on URI
redis://username:password@localhost:6379/2
redis://:mypassword@redis-server.com:6379/5