Skip to Content Skip to Search

module ActionView::LookupContext::DetailsCache

Add caching behavior on top of Details.

Attributes

[RW] cache

Public instance methods

Temporary skip passing the details_key forward.

Source code GitHub
# File actionview/lib/action_view/lookup_context.rb, line 108
def disable_cache
  old_value, @cache = @cache, false
  yield
ensure
  @cache = old_value
end

Private instance methods

Source code GitHub
# File actionview/lib/action_view/lookup_context.rb, line 116
def _set_detail(key, value) # :doc:
  @details = @details.dup if @digest_cache || @details_key
  @digest_cache = nil
  @details_key = nil
  @details[key] = value
end

Definition files