Fix #4129: Remove tag alias caching.

This commit is contained in:
evazion
2019-08-10 21:35:38 -05:00
parent 96b28a77e7
commit c7bcce429e
4 changed files with 11 additions and 56 deletions

View File

@@ -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