From 3c90f7a25870524fc980d746e85c440e693c0a63 Mon Sep 17 00:00:00 2001 From: Matt Stopa Date: Wed, 10 Jul 2013 00:08:10 -0600 Subject: Add documentation for FileStore#increment and #decrement [ci skip] --- activesupport/lib/active_support/cache/file_store.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/lib/active_support/cache/file_store.rb') diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 79fe84e6b6..472f23c1c5 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -39,6 +39,8 @@ module ActiveSupport end end + # Increments an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. def increment(name, amount = 1, options = nil) file_name = key_file_path(namespaced_key(name, options)) lock_file(file_name) do @@ -53,6 +55,8 @@ module ActiveSupport end end + # Decrements an already existing integer value that is stored in the cache. + # If the key is not found nothing is done. def decrement(name, amount = 1, options = nil) file_name = key_file_path(namespaced_key(name, options)) lock_file(file_name) do -- cgit v1.2.3