From 4c3077183b91e3972b07e5488ce12e5b8a6b68a5 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 21 Feb 2008 01:35:27 +0000 Subject: Add #clear to mem_cache_store, flushes all caches git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/cache/mem_cache_store.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 71b28ca6f5..88e324aa3a 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -55,6 +55,10 @@ module ActiveSupport raise "Not supported by Memcache" end + def clear + @data.flush_all + end + private def expires_in(options) (options && options[:expires_in]) || 0 -- cgit v1.2.3