class ActiveSupport::Cache::FileStore
def increment(name, amount = 1, options = nil)
cache.increment("baz") # => 6
cache.write("baz", 5)
To set a specific value, call #write:
cache.increment("bar", 100) # => 100
cache.increment("foo") # => 1
If the key is unset, it starts from +0+:
Increment a cached integer value. Returns the updated value.
def increment(name, amount = 1, options = nil) modify_value(name, amount, options) end