--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: value
comment: 
- !ruby/struct:SM::Flow::P 
  body: "&quot;cas&quot; is a check and set operation which means &quot;store this data but only if no one else has updated since I last fetched it.&quot; This can be used as a form of optimistic locking."
- !ruby/struct:SM::Flow::P 
  body: "Works in block form like so:"
- !ruby/struct:SM::Flow::VERB 
  body: "  cache.cas('some-key') do |value|\n    value + 1\n  end\n"
- !ruby/struct:SM::Flow::P 
  body: "Returns: <tt>nil</tt> if the value was not found on the memcached server. <tt>STORED</tt> if the value was updated successfully <tt>EXISTS</tt> if the value was updated by someone else since last fetch"
full_name: MemCache#cas
is_singleton: false
name: cas
params: (key, expiry=0, raw=false) {|value| ...}
visibility: public
