aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/cache/file_store.rb
diff options
context:
space:
mode:
authorMatt Stopa <matthew.p.stopa@gmail.com>2013-07-10 00:08:10 -0600
committerMatt Stopa <matthew.p.stopa@gmail.com>2013-07-10 00:08:10 -0600
commit3c90f7a25870524fc980d746e85c440e693c0a63 (patch)
tree254c59a0de53025bff306285f220486bef1bdc37 /activesupport/lib/active_support/cache/file_store.rb
parentd06a98b7d9d3a8717cbe42ad506a21dc48613149 (diff)
downloadrails-3c90f7a25870524fc980d746e85c440e693c0a63.tar.gz
rails-3c90f7a25870524fc980d746e85c440e693c0a63.tar.bz2
rails-3c90f7a25870524fc980d746e85c440e693c0a63.zip
Add documentation for FileStore#increment and #decrement
[ci skip]
Diffstat (limited to 'activesupport/lib/active_support/cache/file_store.rb')
-rw-r--r--activesupport/lib/active_support/cache/file_store.rb4
1 files changed, 4 insertions, 0 deletions
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