redis基础一_常用指令
生活随笔
收集整理的這篇文章主要介紹了
redis基础一_常用指令
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
# 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:有序集合?
?
轉載于:https://www.cnblogs.com/ustc-anmin/p/11071047.html
總結
以上是生活随笔為你收集整理的redis基础一_常用指令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python获取重定向url_pytho
- 下一篇: 教程——sumolympics