method

caching?

Importance_1
v7.0.0 - Show latest stable - 0 notes - Class: ActionView::Helpers::CacheHelper
caching?() public

Returns whether the current view fragment is within a cache block.

Useful when certain fragments aren’t cacheable:

<% cache project do %>
  <% raise StandardError, "Caching private data!" if caching? %>
<% end %>
Show source
Register or log in to add new notes.