mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
smarter clear cache to help tests
This commit is contained in:
parent
c4c5c10ea0
commit
fb41816003
1 changed files with 1 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue