mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -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
|
end
|
||||||
|
|
||||||
def self.clear_cache!
|
def self.clear_cache!
|
||||||
Category.select(:id).each do |c|
|
$redis.keys('random_topic_cache*').each{|k| $redis.del k}
|
||||||
$redis.del cache_key(c)
|
|
||||||
end
|
|
||||||
$redis.del cache_key
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.cache_key(category=nil)
|
def self.cache_key(category=nil)
|
||||||
|
|
Loading…
Reference in a new issue