alternative to tag cache fetch to see if it works better

This commit is contained in:
r888888888
2013-04-16 20:40:17 -07:00
parent 10d2c9cdfb
commit 10f8e070af

View File

@@ -73,9 +73,13 @@ class Tag < ActiveRecord::Base
end
def categories_for(tag_names)
Cache.get_multi(tag_names, "tc") do |name|
select_category_for(name)
Array(tag_names).inject({}) do |hash, tag_name|
hash[tag_name] = category_for(tag_name)
hash
end
# Cache.get_multi(tag_names, "tc") do |name|
# select_category_for(name)
# end
end
end