Memcached and Rails Fragment Caching Issue
Posted
by Michael Waxman
on Stack Overflow
See other posts from Stack Overflow
or by Michael Waxman
Published on 2010-05-01T16:19:40Z
Indexed on
2010/05/01
16:27 UTC
Read the original article
Hit count: 445
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
© Stack Overflow or respective owner