Redis

From Ever changing code
Revision as of 09:25, 17 September 2020 by Pio2pio (talk | contribs)
Jump to navigation Jump to search

This is most about AWS ElastiCache service, Redis cache that is fast key/value store.

Install the cli client only, Ubuntu 20.04

apt install redis-tools


Test connectivity

redis-cli -h re111111111111.aaaaaa.ng.0001.cac1.cache.amazonaws.com -p 6379 ping
PONG
redis-cli -h redis.acme.com -p 6379 ping
PONG


Connect to the server and run commands from cli:

# connect to the server
redis-cli -h redis.acme.com -p 6379 ping

# list keys 'KEYS pattern'
redis.acme.com:6379> KEYS *Auth*

# set value
redis.acme.com:6379>  SET mykey 10
"OK"

# read value
redis.acme.com:6379>  DUMP mykey
"\u0000\xC0\n\t\u0000\xBEm\u0006\x89Z(\u0000\n"