public Method

MemCache.incr(key, amount = 1)

Increments the value for key by amount and retruns the new value. key must already exist. If key is not an integer, it is assumed to be 0.

Source Code

# File active_support/vendor/memcache-client-1.5.0/memcache.rb, line 303
def incr(key, amount = 1)
  server, cache_key = request_setup key

  if @multithread then
    threadsafe_cache_incr server, cache_key, amount
  else
    cache_incr server, cache_key, amount
  end
rescue TypeError, SocketError, SystemCallError, IOError => err
  handle_error server, err
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.