Difference between revisions of "Redis"

From Ever changing code
Jump to navigation Jump to search
(Created page with "This is most about AWS ElastiCache service, Redis cache. Install the cli client only, Ubuntu 20.04 <source lang=bash> apt install redis-tools </source> Test connectivity <s...")
 
Line 11: Line 11:
redis-cli -h re111111111111.aaaaaa.ng.0001.cac1.cache.amazonaws.com -p 6379 ping
redis-cli -h re111111111111.aaaaaa.ng.0001.cac1.cache.amazonaws.com -p 6379 ping
PONG
PONG
redis-cli -h redis.acme.com -p 6379 ping
PONG
</source>
Connect to the server and run [https://redis.io/commands commands] from cli:
<source lang=bash>
# 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"
</source>
</source>

Revision as of 09:25, 17 September 2020

This is most about AWS ElastiCache service, Redis cache.

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"