Fix #4129: Remove tag alias caching.
This commit is contained in:
@@ -13,19 +13,12 @@ class TagAliasCorrection
|
||||
|
||||
def statistics_hash
|
||||
@statistics_hash ||= {
|
||||
"antecedent_cache" => Cache.get("ta:" + Cache.hash(tag_alias.antecedent_name)),
|
||||
"consequent_cache" => Cache.get("ta:" + Cache.hash(tag_alias.consequent_name)),
|
||||
"antecedent_count" => Tag.find_by_name(tag_alias.antecedent_name).try(:post_count),
|
||||
"consequent_count" => Tag.find_by_name(tag_alias.consequent_name).try(:post_count)
|
||||
}
|
||||
end
|
||||
|
||||
def clear_cache
|
||||
tag_alias.clear_all_cache
|
||||
end
|
||||
|
||||
def fix!
|
||||
clear_cache
|
||||
tag_alias.delay(:queue => "default").update_posts
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user