Module: PagesCore::StaticCacheController::ClassMethods
- Defined in:
- app/controllers/concerns/pages_core/static_cache_controller.rb
Instance Method Summary collapse
- #static_cache(*actions, permanent: false) ⇒ Object (also: #caches_page)
Instance Method Details
#static_cache(*actions, permanent: false) ⇒ Object Also known as: caches_page
12 13 14 15 16 17 18 19 |
# File 'app/controllers/concerns/pages_core/static_cache_controller.rb', line 12 def static_cache(*actions, permanent: false) before_action :prepare_static_cache if permanent after_action :cache_static_page_permanently, only: actions else after_action :cache_static_page, only: actions end end |