class ActiveSupport::Cache::RedisCacheStore
def increment(name, amount = 1, options = nil)
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.
Increment a cached value. This method uses the Redis incr atomic
Cache Store API implementation.
def increment(name, amount = 1, options = nil) instrument :increment, name, amount: amount do failsafe :increment do options = merged_options(options) key = normalize_key(name, options) redis.with do |c| c.incrby(key, amount).tap do write_key_expiry(c, key, options) end end end end end