Module: AbstractController::Caching
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
self,
Fragments ,
ConfigMethods
|
|
Defined in: | actionpack/lib/abstract_controller/caching.rb, actionpack/lib/abstract_controller/caching/fragments.rb |
Fragments
- Attributes & Methods
Class Method Summary
::ActiveSupport::Autoload
- Extended
::ActiveSupport::Concern
- Extended
class_methods | Define class methods from given block. |
included | Evaluate given block in context of base class, so that you can write class macros here. |
prepended | Evaluate given block in context of base class, so that you can write class macros here. |
append_features, prepend_features |
Instance Attribute Summary
ConfigMethods
- Included
Instance Method Summary
- #view_cache_dependencies
-
#cache(key, options = {}, &block)
private
Convenience accessor.
Fragments
- Included
#combined_fragment_cache_key | Given a key (as described in |
#expire_fragment | Removes fragments from the cache. |
#fragment_exist? | Check if a cached fragment from the location signified by |
#read_fragment | Reads a cached fragment from the location signified by |
#write_fragment | Writes |
#instrument_fragment_cache |
DSL Calls
included
[ GitHub ]32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
# File 'actionpack/lib/abstract_controller/caching.rb', line 32
included do extend ConfigMethods config_accessor :default_static_extension self.default_static_extension ||= ".html" config_accessor :perform_caching self.perform_caching = true if perform_caching.nil? config_accessor :enable_fragment_cache_logging self.enable_fragment_cache_logging = false class_attribute :_view_cache_dependencies, default: [] helper_method :view_cache_dependencies if respond_to?(:helper_method) end
Class Attribute Details
.fragment_cache_keys (rw)
[ GitHub ]# File 'actionpack/lib/abstract_controller/caching/fragments.rb', line 26
class_attribute :fragment_cache_keys
.fragment_cache_keys? ⇒ Boolean
(rw)
[ GitHub ]
# File 'actionpack/lib/abstract_controller/caching/fragments.rb', line 26
class_attribute :fragment_cache_keys
Instance Attribute Details
#fragment_cache_keys (rw)
[ GitHub ]# File 'actionpack/lib/abstract_controller/caching/fragments.rb', line 26
class_attribute :fragment_cache_keys
#fragment_cache_keys? ⇒ Boolean
(rw)
[ GitHub ]
# File 'actionpack/lib/abstract_controller/caching/fragments.rb', line 26
class_attribute :fragment_cache_keys
Instance Method Details
#cache(key, options = {}, &block) (private)
Convenience accessor.
# File 'actionpack/lib/abstract_controller/caching.rb', line 60
def cache(key, = {}, &block) # :doc: if cache_configured? cache_store.fetch(ActiveSupport::Cache. (key, :controller), , &block) else yield end end
#view_cache_dependencies
[ GitHub ]# File 'actionpack/lib/abstract_controller/caching.rb', line 54
def view_cache_dependencies self.class._view_cache_dependencies.filter_map { |dep| instance_exec(&dep) } end