Skip to Content Skip to Search

module AbstractController::Caching

Inherits From

Public instance methods

view_cache_dependencies()

Permalink
Source code GitHub
# File actionpack/lib/abstract_controller/caching.rb, line 52
def view_cache_dependencies
  self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) }
end

Private instance methods

cache(key, options = {}, &block)

Permalink

Convenience accessor.

Source code GitHub
# File actionpack/lib/abstract_controller/caching.rb, line 58
def cache(key, options = {}, &block) # :doc:
  if cache_configured?
    cache_store.fetch(ActiveSupport::Cache.expand_cache_key(key, :controller), options, &block)
  else
    yield
  end
end

Namespace

Definition files