From f4c74c6b20d19923a7b24ed62c3a9e836e545515 Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Mon, 6 Jan 2014 23:45:44 -0500 Subject: [PATCH] Remove QueryCache.clear_cache from purge --- lib/mongoid/config.rb | 1 - spec/mongoid/query_cache_spec.rb | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongoid/config.rb b/lib/mongoid/config.rb index 895f0d8996..aa2d30aede 100644 --- a/lib/mongoid/config.rb +++ b/lib/mongoid/config.rb @@ -169,7 +169,6 @@ def override_session(name) # # @since 2.0.2 def purge! - Mongoid::QueryCache.clear_cache Sessions.default.collections.each do |collection| collection.drop end and true diff --git a/spec/mongoid/query_cache_spec.rb b/spec/mongoid/query_cache_spec.rb index cc7f98cad3..24cb7f2e01 100644 --- a/spec/mongoid/query_cache_spec.rb +++ b/spec/mongoid/query_cache_spec.rb @@ -3,6 +3,7 @@ describe Mongoid::QueryCache do around do |spec| + Mongoid::QueryCache.clear_cache Mongoid::QueryCache.cache { spec.run } end