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
- 0 is the flag
- 3 is the
- 21 is the token
- 123 is the value