activesupport/lib/active_support/cache/memory_store.rb
def increment(name, amount = 1, options = nil)
        synchronize do
          options = merged_options(options)
          if num = read(name, options)
            num = num.to_i + amount
            write(name, num, options)
            num
          else
            nil
          end
        end
      end
# Increment an integer value in the cache.
Increment an integer value in the cache.
Increment an integer value in the cache .
def increment(name, amount = 1, options = nil)
        synchronize do
          options = merged_options(options)
          if num = read(name, options)
            num = num.to_i + amount
            write(name, num, options)
            num
          else
            nil
          end
        end
      end
def increment ( name , amount = 1 , options = nil ) synchronize do options = merged_options ( options ) if num = read ( name , options ) num = num . to_i + amount write ( name , num , options ) num else nil end end end
Increment an integer value in the cache.
Increment an integer value in the cache .
name
amount
options