method

caching?

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 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.