Memcached and Rails Fragment Caching Issue
- by Michael Waxman
When I have 2 views that fragment cache the same query BUT display them differently, there is only one fragment and they both display it the same way. Is there any way around this? For example...
#views/posts/list
- cache(@posts) do
- for p in @posts
= p.title
#views/posts/list_with_images
- cache(@posts) do
- for p in @posts
= p.title
= p.content
= image_tag(p.image_url)
#controllers/posts_controller
def list
...
@posts = Post.all
end
def list_with_images
...
@posts = Post.all
end