当前位置:网站首页>Redis data type
Redis data type
2022-07-24 18:37:00 【51CTO】
redis There are five data types , Include -string、-list、-set、-sort set、-hash
Simple introduction to use
-string
string For the simplest type , And Memcached Same type , One key Corresponding to one value, It supports operations with Memcached Similar to , It has more functions , Set the object that can store binary .
stay redis Under the directory of redis-cli You can enter redis The command line ( You can enter directly without setting a password )
Example : save string Data of type
-list
list Is a linked list structure , The main functions are push,pop Get all the values of a range and so on , In operation key The name of the list
Use list structure , It can easily realize the ranking of the latest news and other functions ,list Another application of is message queuing , You can use list Of push The operation will cause the task to exist list in , Then the worker thread uses pop The operation takes the task out for execution
It can be understood as push To press in pop For taking out
Use format as LPUSH 、 LPOP
Example :
-set
set It is the set that adds and deletes elements for the operation of the set , There are operations such as intersection and difference of multiple sets , In operation key The name of a collection
Example :
-sort set
sort set It's an ordered set It is better than set One more. score So that the elements in the set can be raised score Make an orderly order
Example :
-hash
hash stay Memcached in We often package structured information into hashmap, The value stored as a string after serialization on the client ,( It's usually JSON Format )
Example :
边栏推荐
- Highcharts chart and report display, export data
- Ionic4 Learning Notes 6 -- using native ionic4 components in custom components
- The difference between KIB and MIB and KB and MB
- Segment tree merge board
- Mid year inventory | in 2022, PAAS will be upgraded again
- 引发0xC0000005内存违例几种可能原因分析
- 字符串的遍历及拼接
- EasyUI framework dialog repeated loading problem
- 【Tkinter】常用组件(二)
- Is the validity period of the root certificate as long as the server SSL certificate?
猜你喜欢

Sword finger offer 21. adjust the array order so that odd numbers precede even numbers

【微信小程序开发】自定义tabBar案例(定制消息99+小红心)

CF. Bits And Pieces(子集状压dp + 剪枝)

永恒之蓝MS17-010exp复现

Mysqlworkbench performance analysis tool -- Performance dashboard

Ionic4 learning notes 8 -- UI component 2 list (no practice, direct excerpt)

Number of times a number appears in an ascending array
![[record of question brushing] 20. Valid brackets](/img/81/7edc2ff0003373fe0ab2868b1a872f.png)
[record of question brushing] 20. Valid brackets

Oracle EBS form common objects and their relationships

Wechat applet reverse
随机推荐
投资的新阶段
Ionic4 learning notes 11 - popular goods display of an East Project
Techempower web framework performance test 21st round results release --asp Net core continue to move forward
Traversal and splicing of strings
Tree chain partition board
KiB、MiB与KB、MB的区别
Namespace: cluster environment sharing and isolation
[record of question brushing] 20. Valid brackets
["code" power is fully open, and "chapter" shows strength] list of contributors to the task challenge in the first quarter of 2022
2020年中职组“网络空间安全”赛项浙江省竞赛任务书及答案(Flag)
Typora is still the most beautiful and beautiful document editing artifact of yyds in my heart. I believe you will never abandon it
Zip compression and decompression
MySQL -- implicit conversion of data type
Revocable search board
Ionic4 learning notes 7 -- UI component 1 (no practice, direct excerpt)
Introduction to nipple music theory and personal perception
第五届数字中国建设峰会在福建福州开幕
Rookie colleagues cost me 2K. Did you recite the secret of salary increase? (collect it quickly!)
Vsftpd2.3.4 port penetration 6200 IRC_ 3281_ backdoor
MySQL configuration file