Memcache.cas
You're seeing just the function
cas
, go back to Memcache module for more information.
Specs
Compare and swap value using optimistic locking.
- Get the existing value for key
- If it exists, call the update function with the value
- Set the returned value for key
The 3rd operation will fail if someone else has updated the value
for the same key in the mean time. In that case, by default, this
function will go to step 1 and try again. Retry behavior can be
disabled by passing [retry: false]
option.