instance method incr

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

incr(key, amount = 1)

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

Parameters

key req
amount opt = 1
Source
# File activesupport/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb, line 295
  def incr(key, amount = 1)
    raise MemCacheError, "Update of readonly cache" if @readonly
    with_server(key) do |server, cache_key|
      cache_incr server, cache_key, amount
    end
  rescue TypeError => err
    handle_error nil, err
  end

Defined in activesupport/lib/active_support/vendor/memcache-client-1.7.4/memcache.rb line 295 · View on GitHub · Improve this page · Find usages on GitHub

Defined in MemCache

Type at least 2 characters to search.

↑↓ navigate · open · esc close