当前位置:网站首页>Value/list in redis
Value/list in redis
2022-07-01 11:22:00 【Daily enlightenment】
list: Acyclic bidirectional linked list
redis key There are two pointers in ,head The head pointer ,tail Tail pointer
lpush key value[value...]
lpush k1 abcdef ==> fedcba
rpush key value[value...]
rpush k1 abcdef ==> abcdef
lpop key
lpop k1 ==> f
rpop key
rpop k2 ==> f
Stack : Same direction command
queue : Reverse command
lrange key start end
lrange k1 0 -1 ==> return k1 All elements in
lindex k1 -1 ==> Take out k1 The last element in
lset k1 3 y ==> Update the index to 3 The elements of , Change it to y
lrem k3 2 a ==> from k3 Remove two from a( From left to right )
lrem k3 -2 a ==> from k3 Remove two from a( From right to left )
linsert k3 after 6 a ==> stay k3 in 6 Add later a( If there are more than one 6, In the first place 6 Add later )
linsert k3 before 6 a ==> stay k3 in 6 Add a
llen k3 ==> Statistics k3 How many elements are there in
blpop key[key...] timeout
timeout: Blocking seconds ,timeout=0 when , It will keep blocking , Until there is data in the future
ltrim key start end: take start end Remove the data at both ends , Does not include the number indicated , Things in the middle will not be deleted
边栏推荐
- Matrix of numpy
- Give up high paying jobs in Shenzhen and go back home
- Paxos 入门
- In June 2022, it was the first programming language?!
- Kernel synchronization mechanism
- sshd_ Discussion on permitrotlogin in config
- Get key code
- Dameng data rushes to the scientific innovation board: it plans to raise 2.4 billion yuan. Feng Yucai was once a professor of Huake
- 2022/6/30学习总结
- IPlImage的width和widthStep
猜你喜欢

kubernetes之ingress探索实践

全局过滤器(处理时间格式)

Neurips 2022 | cell image segmentation competition officially launched!

Node version manager NVM installation and switching

Skip the test cases to be executed in the unittest framework

華為設備配置大型網絡WLAN基本業務

【AI资讯月刊】350+资源大盘点!6月不容错过的资料和动态,都都都在这里啦!<附下载>

CVPR 2022 | Virtual Correspondence: Humans as a Cue for Extreme-View Geometry

2022/6/28学习总结

华为设备配置大型网络WLAN基本业务
随机推荐
Mingchuang plans to be listed on July 13: the highest issue price is HK $22.1, and the net profit in a single quarter decreases by 19%
关于Keil编译程序出现“File has been changed outside the editor,reload?”的解决方法
树莓派4B安装tensorflow2.0[通俗易懂]
redis中value/hush
Face detection and recognition system based on mtcnn+facenet
CVPR 2022 | self enhanced unpaired image defogging based on density and depth decomposition
CVPR 2022 | Virtual Correspondence: Humans as a Cue for Extreme-View Geometry
全局过滤器(处理时间格式)
力扣(LeetCode)181. 超过经理收入的员工(2022.06.29)
Shangtang entered the lifting period: the core management voluntarily banned and strengthened the company's long-term value confidence
8款最佳实践,保护你的 IaC 安全!
金鱼哥RHCA回忆录:DO447使用Ansible与API通信--使用Ansible Tower API启动作业
田溯宁投的天润云上市:市值22亿港元 年利润下降75%
华为设备配置大型网络WLAN基本业务
Software project management 9.2 Software project configuration management process
Global filter (processing time format)
Numpy的矩阵
Applymiddleware principle
Paxos 入门
Can I open a securities account anywhere? Is it safe to open an account