instance method
increment
Ruby on Rails 2.3.18
Since v2.2.3Signature
increment(key, amount = 1)
No documentation comment.
Parameters
-
keyreq -
amountopt = 1
Source
# File activesupport/lib/active_support/cache.rb, line 216
def increment(key, amount = 1)
log("incrementing", key, amount)
if num = read(key)
write(key, num + amount)
else
nil
end
end
Defined in activesupport/lib/active_support/cache.rb line 216
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::Store