当前位置:网站首页>Redis command
Redis command
2022-07-03 06:48:00 【Numerous and falling】
install
redis From entry to proficiency
windows Installation tutorial
Install the package version into the decompression directory and enter :
redis-server --service-install redis.windows.conf --loglevel verbose -- install
redis-server --service-start -- start-up
redis-server --service-stop -- close
command
string
set name cxx
get name
getrange name 0 2 Intercept string from subscript 0 Start to subscript 2 end
getset name new_cxx Set new value , Return old value
mset key1 key2 Batch settings
mget key1 key2 Batch acquisition
setnx key value Insert if it doesn't exist (not exists)
setex key time value Expiration time (expire)
setrange key index value from index Start using value Replace the original value
incr age Increasing , In steps of 1
incrby age 10 Increasing , In steps of 10
decr age Decline , In steps of 1
decrby age 10 Decline , In steps of 10
incrbyfloat age 0.5 Increasing floating point number
append Additional
strlen length
getbit/setbit/bitcount/bitop Bit operation
hash
hset myhash name cxx
hget myhash name
hmset myhash name cxx age 25 note "i am notes"
hmget myhash name age note
hgetall myhash obtain myhash All of the key value
hexists myhash name Whether there is
hsetnx myhash score 100 There is no modification , Insert if it doesn't exist
hincrby myhash id 1 Increasing
hdel myhash name Delete
hkeys myhash Take only key
hvals myhash Take only value
hlen myhash length
list
lpush mylist a b c Insert left
rpush mylist x y z Insert right
lrange mylist 0 -1 Data set
lpop mylist Pop up elements
rpop mylist Pop up elements
llen mylist length
lrem mylist count value Delete
lindex mylist 2 Specifies the value of the index
lset mylist 2 n Index settings
ltrim mylist 0 4 Delete key
linsert mylist before a Insert
linsert mylist after a Insert
rpoplpush list list2 List of data transferred
set
sadd myset redis
smembers myset Data set
srem myset set1 Delete
sismember myset set1 Determines whether an element is in the set
scard key_name Number
sdiff | sinter | sunion operation : Operations between sets : Difference set | intersection | Combine
srandmember Get the elements in the collection at random
spop Pop an element from the collection
zset
zadd zset 1 one
zadd zset 2 two
zadd zset 3 three
zincrby zset 1 one Increase the score
zscore zset two Get points
zrange zset 0 -1 withscores Range value
zrangebyscore zset 10 25 withscores The value of the specified range
zrangebyscore zset 10 25 withscores limit 1 2 Pagination
Zrevrangebyscore zset 10 25 withscores The value of the specified range
zcard zset Element quantity
Zcount zset Get the number of elements in the specified score range
Zrem zset one two Delete one or more elements
Zremrangebyrank zset 0 1 Delete elements... According to the ranking range
Zremrangebyscore zset 0 1 Delete elements... According to the score range
Zrank zset 0 -1 The element with the lowest score is ranked as 0
Zrevrank zset 0 -1 The element with the highest score is ranked as 0
Zinterstore
zunionstore rank:last_week 7 rank:20150323 rank:20150324 rank:20150325 weights 1 1 1 1 1 1 1
边栏推荐
- IC_EDA_ALL虚拟机(丰富版):questasim、vivado、vcs、verdi、dc、pt、spyglass、icc2、synplify、INCISIVE、IC617、MMSIM、工艺库
- 每日刷题记录 (十一)
- Interface test weather API
- Unittest attempt
- Code management tools
- La loi des 10 000 heures ne fait pas de vous un maître de programmation, mais au moins un bon point de départ
- Paper notes vsalm literature review "a comprehensive survey of visual slam algorithms"
- Application scenarios of Catalan number
- Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
- SQL实现将多行记录合并成一行
猜你喜欢

IE browser flash back, automatically open edge browser

Selenium - by changing the window size, the width, height and length of different models will be different

2022 East China Normal University postgraduate entrance examination machine test questions - detailed solution
![[classes and objects] explain classes and objects in simple terms](/img/41/250457530880dfe3728432c2ccd50b.png)
[classes and objects] explain classes and objects in simple terms

利用C#实现Pdf转图片

10000小時定律不會讓你成為編程大師,但至少是個好的起點

100000 bonus is divided up. Come and meet the "sister who braves the wind and waves" among the winners

ssh链接远程服务器 及 远程图形化界面的本地显示

Scripy learning

如何迁移或复制VMware虚拟机系统
随机推荐
Simple password lock
Simple understanding of bubble sorting
2022-06-23 vgmp OSPF inter domain security policy NAT policy (under update)
Summary of remote connection of MySQL
opencv
opencv
Pytest -- write and manage test cases
Getting started with pytest
【C#/VB.NET】 将PDF转为SVG/Image, SVG/Image转PDF
ROS+Pytorch的联合使用示例(语义分割)
[C /vb.net] convert PDF to svg/image, svg/image to PDF
Request weather interface format, automation
每日刷题记录 (十一)
Realize PDF to picture conversion with C #
What are the characteristics and functions of the scientific thinking mode of mechanical view and system view
Machine learning | simple but feature standardization methods that can improve the effect of the model (comparison and analysis of robustscaler, minmaxscaler, standardscaler)
保险公司怎么查高血压?
Personally design a highly concurrent seckill system
方差迭代公式推导
Various usages of MySQL backup database to create table select and how many days are left