Browse files

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
  • Loading branch information...
1 parent 5b5d236 commit 4c3077183b91e3972b07e5488ce12e5b8a6b68a5 @jeremy jeremy committed Feb 21, 2008
Showing with 4 additions and 0 deletions.
  1. +4 −0 activesupport/lib/active_support/cache/mem_cache_store.rb
View
4 activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -55,6 +55,10 @@ def delete_matched(matcher, options = nil)
raise "Not supported by Memcache"
end
+ def clear
+ @data.flush_all
+ end
+
private
def expires_in(options)
(options && options[:expires_in]) || 0

0 comments on commit 4c30771

Please sign in to comment.