redis
Install Redis
Install latest Redis on Ubuntu/Debian Server
Install Redis on Plesk Debian Server
Install Redis from Source
How Tos
Installing Redis PHP module CentOS 7
Connect to redis from PHP
Monitor redis with redis-cli
redis commander – Web GUI for Redis
How to find Redis data directory
How to flush Redis cache
Redis error currently not able to persist on disk
Checking if Redis works
1 2 3 |
# telnet 127.0.0.1 6379 set testkey 10 get testkey |
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 |
root@ip-10-0-0-31:~# telnet news24redis.cylrbg.0001.use1.cache.amazonaws.com 6379 Trying 10.0.0.223... Connected to news24redis.cylrbg.0001.use1.cache.amazonaws.com. Escape character is '^]'. set testkey 10 +OK get testkey $2 10 quit +OK Connection closed by foreign host. root@ip-10-0-0-31:~# |
Count Number of Keys
To count number of keys, use
1 |
DBSIZE |
Example
1 2 3 4 5 6 |
root@ip-10-0-0-31:~# telnet news24redis.cylrbg.0001.use1.cache.amazonaws.com 6379 Trying 10.0.0.223... Connected to news24redis.cylrbg.0001.use1.cache.amazonaws.com. Escape character is '^]'. DBSIZE :4114 |
Here DBSIZE returned 4114, that means you have that much key/value stored in redis.
Flush ALl
To flush all keys, use
1 |
redis-cli flushall |