From 355bdeb54e8e45a7cd351ab3b35354107bc1c093 Mon Sep 17 00:00:00 2001 From: Devon Estes Date: Tue, 15 Nov 2016 13:39:27 +0100 Subject: [PATCH] Add missing documentation for MemoryStore#clear [ci skip] We were missing some form of documentation for this method, so I've gone ahead and added some! --- activesupport/lib/active_support/cache/memory_store.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/activesupport/lib/active_support/cache/memory_store.rb b/activesupport/lib/active_support/cache/memory_store.rb index 968e72d76518b..3323e4edc99dd 100644 --- a/activesupport/lib/active_support/cache/memory_store.rb +++ b/activesupport/lib/active_support/cache/memory_store.rb @@ -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 @@ -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