method
cache_if
v5.1.7 -
Show latest stable
- Class:
ActionView::Helpers::CacheHelper
cache_if(condition, name = {}, options = {}, &block)public
Cache fragments of a view if condition is true
<% cache_if admin?, project do %> <b>All the topics on this project</b> <%= render project.topics %> <% end %>