diff --git a/app/services/random_topic_selector.rb b/app/services/random_topic_selector.rb index 7c2026b5e..d412a2389 100644 --- a/app/services/random_topic_selector.rb +++ b/app/services/random_topic_selector.rb @@ -69,10 +69,7 @@ class RandomTopicSelector end def self.clear_cache! - Category.select(:id).each do |c| - $redis.del cache_key(c) - end - $redis.del cache_key + $redis.keys('random_topic_cache*').each{|k| $redis.del k} end def self.cache_key(category=nil)