Skip to content

Commit

Permalink
Merge pull request #27051 from devonestes/adding-cache-clear-docs
Browse files Browse the repository at this point in the history
Add missing documentation for MemoryStore#clear [ci skip]
  • Loading branch information
vipulnsward committed Mar 12, 2017
2 parents c186bf6 + 355bdeb commit 254b831
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions activesupport/lib/active_support/cache/memory_store.rb
Expand Up @@ -28,6 +28,7 @@ def initialize(options = nil)
@pruning = false
end

# Delete all data stored in a given cache store.
def clear(options = nil)
synchronize do
@data.clear
Expand Down Expand Up @@ -83,6 +84,7 @@ def decrement(name, amount = 1, options = nil)
modify_value(name, -amount, options)
end

# Deletes cache entires if the cache key matches a given pattern
def delete_matched(matcher, options = nil)
options = merged_options(options)
instrument(:delete_matched, matcher.inspect) do
Expand Down

0 comments on commit 254b831

Please sign in to comment.