From af0ead3822b3b45a47255492f2225369fc3f896d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 3 Aug 2014 15:06:43 +0200 Subject: [PATCH] workaround, set test cache before clear whole cache, Rails.cache.clear complains about not existing cache dir. --- lib/cache.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cache.rb b/lib/cache.rb index 4fb96344e..47cc952f8 100644 --- a/lib/cache.rb +++ b/lib/cache.rb @@ -16,6 +16,9 @@ module Cache end def self.clear # puts 'Cache.clear...' + # workaround, set test cache before clear whole cache, Rails.cache.clear complains about not existing cache dir + Cache.write('test',1 ) + Rails.cache.clear end end \ No newline at end of file