search for: content_cach

Displaying 1 result from an estimated 1 matches for "content_cach".

2012 Nov 29
3
Proposal: faragment cache with :if / :unless conditions
...sly wrap every nested partial call inside a cache for itself. This is technically not the same in terms of performance gain (not all computations inside the main partial would be cached) and it would probably be more clean to have something like this (trivialized): <%= cache(@model, unless: content_cachable?(@model)) do %> <% if @model.render_good? %> <%= render ''good_one'' %> <% else %> <%= render ''bad_one'' %> <% end %> ... other tens of similar conditions <% end %> This may reveal some bad partial d...