In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the basic grammar of Memcached". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the basic grammar of Memcached"?
Basic syntax of Memcached
Set command: command to store value values in the specified key
Set key flags exptime bytes [noreply] value
Key: key in the key value key-value structure, which is used to find cached values.
Flags: can include integer parameters for key-value pairs, which clients use to store additional information about key-value pairs.
Exptime: length of time to keep key-value pairs in the cache (in seconds, 0 means forever)
Bytes: the number of bytes stored in the cache
Noreply (optional): this parameter tells the server that there is no need to return data
Value: the stored value (always on the second line) (can be directly understood as value in the key-value structure)
Set yx 0900 9memcachedSTORED # indicates that the setting is successful; get yxSTORED: output after successful save. ERROR: output after a failed save.
Add command:
The Memcached add command stores the value (data value) in the specified key (key). If the key for add already exists, the data will not be updated (expired key will be updated), the previous values will remain the same, and you will get the response NOT_STORED.
Add key flags exptime bytes [noreply] value
Key: key in the key value key-value structure, which is used to find cached values.
Flags: can include integer parameters for key-value pairs, which clients use to store additional information about key-value pairs.
Exptime: length of time to keep key-value pairs in the cache (in seconds, 0 means forever)
Bytes: the number of bytes stored in the cache
Noreply (optional): this parameter tells the server that there is no need to return data
Value: the stored value (always on the second line) (can be directly understood as value in the key-value structure)
STORED: output after successful save. NOT_STORED: output after a failed save. At this point, I believe you have a deeper understanding of "what is the basic grammar of Memcached". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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
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.