# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
./redis-server /path/to/redis.conf
docker啟動redis:
docker run -d -p 6379:6379 -v /home/anmin/Desktop/docker/redis/data:/redis/data -v /home/anmin/Desktop/docker/redis/config:/redis/config redis redis-server /redis/config/redis.conf --appendonly yes
啟動 redis 客戶端:
切換數據庫,redis默認有16個數據庫:
DBSIZE:
KEYS:查找所有符合給定模式pattern(正則表達式)的 key 。
?
?KEY:
? ?
? ??
STRING:
? ? ?
? ? ?
? ?
??
?
?LIST
返回存儲在 key 的列表里指定范圍內的元素。 start 和 end 偏移量都是基于0的下標,即list的第一個元素下標是0(list的表頭),第二個元素下標是1,以此類推。
偏移量也可以是負數,表示偏移量是從list尾部開始計數。 例如, -1 表示列表的最后一個元素,-2 是倒數第二個,以此類推。
? ??
? ?
SET
? ? ??
?HASH:?
? ??
?
?
?ZSET:有序集合?
?