activesupport/lib/active_support/cache/memory_store.rb
# Decrement an integer value in the cache.
Decrement an integer value in the cache.
Decrement an integer value in the cache .
def decrement(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 decrement ( 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
Decrement an integer value in the cache.
Decrement an integer value in the cache .
name
<not_specific>
amount
<not_specific>
options
<not_specific>