Fernando Perez
2008-Nov-13 17:30 UTC
Fragment caching strangely honors the options I pass to it
Hi, In my view I have the following cache: <%- cache(:controller => ''products'', :action => ''index'', :action_suffix => ''footer'') do -%> ... <%- end -%> And that''s the file generated: tmp/cache/views/www.mysite.com/products.action_suffix=footer.cache Why isn''t fragment caching picking up the :index option, and incorrectly making use of action_suffix? According to the API (http://www.railsbrain.com/api/rails-2.1.2/doc/index.html?a=C00000103&name=ActionController::Caching::Fragments), I should be getting the following filee: tmp/cache/views/www.mysite.com/products/index/footer.cache Any idea? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fernando Perez
2008-Nov-13 17:45 UTC
Re: Fragment caching strangely honors the options I pass to
> And that''s the file generated: > tmp/cache/views/www.mysite.com/products.action_suffix=footer.cache >Hmm, according to railsenvy''s tutorial on the topic, it seems correct: http://www.railsenvy.com/2007/3/20/ruby-on-rails-caching-tutorial-part-2#fragment Maybe it is not making use of the :action option because I have developed my app restfully, so /products implicitly triggers the index action? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---