Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
litespeed_wiki:lsmcd:commands:cas [2016/04/06 21:35] Rob Holda created |
litespeed_wiki:lsmcd:commands:cas [2016/04/07 18:35] Rob Holda |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== cas ===== | ===== cas ===== | ||
- | Check-and-Set an item; store data only if no one else has updated the item since its last fetch, determined with the cas token from the **gets** command. LSMCD assigns a unique 64-bit CAS token to all items stored in it. | + | Check-and-Set an item; store data only if no one else has updated the item since its last fetch, determined with the cas token from the [[litespeed_wiki:lsmcd:commands:gets|gets]] command. LSMCD assigns a unique 64-bit cas token to all items stored in it. |
**syntax:** | **syntax:** | ||
Line 25: | Line 25: | ||
* **120** → store data for 2 minutes (120 seconds) | * **120** → store data for 2 minutes (120 seconds) | ||
* **10** → data is 10 bytes long | * **10** → data is 10 bytes long | ||
- | * **2** → unique token number obtained from **gets** command | + | * **2** → unique token number obtained from [[litespeed_wiki:lsmcd:commands:gets|gets]] command |
+ | |||
+ | **possible errors:** | ||
+ | * **ERROR** - Indicates an error while saving data or the wrong syntax. | ||
+ | * **EXISTS** - Indicates that someone has modified the CAS data since its last fetch. | ||
+ | * **NOT_FOUND** - Indicates that the provided key does not exist in the LSMCD server. |