cahed_tag_list does not work as expected
uberllama opened this issue · comments
The doc says to use the tag_list accessor as normal, but even with a cahced_tag_list column present, a query is being performed to get an object's tags.
Example:
posts/show
<%= @post.tag_list %>
=> SELECT tags
.* FROM tags
INNER JOIN taggings
ON tags
.id = taggings
.tag_id WHERE ((taggings
.taggable_id = 12345) AND (taggings
.taggable_type = 'Post'))
I would expect it to return the cached tag list instead. Caching does work as expected when editing an object, and no query is performed.
I cant see an issue here, there are tests that cover this scenario. Are you sure the cache column is named correctly and is populated. Post.caching_tag_list? should return true, does it?
Please provide a failing test case if there is still a problem here.
I'm no longer using this plugin so don't have any active examples I can provide. Will update at such a time as this changes. Cheers.