class ActiveSupport::Cache::RedisCacheStore

def decrement(name, amount = 1, options = nil)

Failsafe: Raises errors.

to zero.
Calling it on a value not stored with +:raw+ will initialize that value
operator and can only be used on values written with the +:raw+ option.
Decrement a cached value. This method uses the Redis decr atomic

Cache Store API implementation.
def decrement(name, amount = 1, options = nil)
  instrument :decrement, name, amount: amount do
    failsafe :decrement do
      options = merged_options(options)
      key = normalize_key(name, options)
      redis.with do |c|
        c.decrby(key, amount).tap do
          write_key_expiry(c, key, options)
        end
      end
    end
  end
end