Add documentation for FileStore#increment and #decrement
[ci skip]
This commit is contained in:
parent
d06a98b7d9
commit
3c90f7a258
@ -39,6 +39,8 @@ def cleanup(options = nil)
|
||||
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 @@ def increment(name, amount = 1, options = nil)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user