diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-21 01:35:27 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-21 01:35:27 +0000 |
commit | 4c3077183b91e3972b07e5488ce12e5b8a6b68a5 (patch) | |
tree | 49110cc1337473be4d4ae43f2ed9fa6e26f5ac8f | |
parent | 5b5d2367923b5317022113bc03bef37b684f7721 (diff) | |
download | rails-4c3077183b91e3972b07e5488ce12e5b8a6b68a5.tar.gz rails-4c3077183b91e3972b07e5488ce12e5b8a6b68a5.tar.bz2 rails-4c3077183b91e3972b07e5488ce12e5b8a6b68a5.zip |
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
-rw-r--r-- | activesupport/lib/active_support/cache/mem_cache_store.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |