Memcached Get Check and Set Operation


Get CAS is used to track key-values in Memcached. Get CAS provides the value with a token. This token is used to Set CAS operation. Syntax is similar to get.

gets key
  • gets verb
  • key  the key we want its value

Example

We can get an existing value with gets. First we will add some data nırmmaly.

add counter 0 0 3 
123  
STORED

Now we want to get the data with token by using gets.

gets counter 
VALUE counter 0 3 21 
123
  • gets is the operation
  • counter is the key
  • VALUE gives detailed information
  • is the flag
  • is the
  • 21 is the token
  • 123 is the value

Python Application

LEARN MORE  Memcached Set Operation with Python Example

Leave a Comment