tags: eliminate Tag.category_for method.
Tag.category_for looked up a tag's category in the Redis cache. This was only used in a few places (in related tags, and on the popular/missed search pages). Get rid of this method so we can work towards getting rid of caching tag categories in Redis.
This commit is contained in:
@@ -985,6 +985,11 @@ class PostQueryBuilder
|
||||
def is_wildcard_search?
|
||||
is_single_tag? && tags.first.wildcard
|
||||
end
|
||||
|
||||
def simple_tag
|
||||
return nil if !is_simple_tag?
|
||||
Tag.find_by_name(tags.first.name)
|
||||
end
|
||||
end
|
||||
|
||||
memoize :split_query, :normalized_query
|
||||
|
||||
Reference in New Issue
Block a user