Quick Reference
Basic Operation
/* Login */
$ redis-cli -h <host> -p <6379> -a <pass>
/* List Database / Keyspace */
> INFO KEYSPACE
/* Use Database / Keyspace */
> SELECT keyspace-index
/* List Table / Collections / Keys */
> KEYS *
/* Logout */
> exit
Database Operation
/* Create the Database / Keyspace */
> CONFIG GET DATABASES
/* Drop the Database */
(set /default/path/redis.conf)
/* Create the Collection/Table/Key */
> SET key value EX seconds NX/XX
/* Drop the Collection/Table */
> DEL key
/* Show the Content */
> GET key
Quick Start
SET key value
SET key value EX seconds
SET key value EX seconds NX/XX
EXISTS key
TYPE key
GET key
KEYS *
EXPIRE key seconds
TTL key
DEL key
INCR key
INCRBY key number
DECR key
DECRBY key number
MSET key1 value1 [key2 value2]
MGET key1 key2