In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2026-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "redis script command execution problem case analysis". The editor shows you the operation process through the actual case, and the operation method is simple, fast and practical. I hope this "redis script command execution problem case analysis" article can help you solve the problem.
1. Execute in the redis-cli command line: # call the redis command to set the cache # do not pass the parameter eval "return redis.call ('set',' name1', 'Tom')" pass a value parameter eval "return redis.call (' set', 'name2', ARGV [1])" 0 "Tom" # pass a key parameter and a value parameter eval "return redis.call (' set', KEYS [1]) ARGV [1]) "1" name3 "Tom" 2, execute on the linux command line: # specify the path to the lua script Unlike in redis-cli, you do not need to specify the number of KEYS, but you need to separate the KEYS and ARGV parameters with a comma, leaving at least 1 space before and after the comma, otherwise redis-cli-a password-- eval. / sadd_script.lua subjects, mathredis-cli-a password-- eval. / sadd_script.lua subjects, history
Define the business code you need in the lua script, demo:
Local setName = KEYS [1] local setValue = ARGV [1] if string.len (setName) > 0 and string.len (setValue) > 0then return redis.call ('sadd', setName, setValue) else return 0end3, php code:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





This article focuses on "how to use conditional comments to judge browsers". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use conditional comments to judge browsers!
Wechat
About us
Contact us
Product review
car news
thenatureplanet
More Form oMedia:
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.