Method: ActionController::Caching::Pages::ClassMethods#expire_page
- Defined in:
- lib/action_controller/caching/pages.rb
#expire_page(path) ⇒ Object
Expires the page that was cached with the path as a key. Example:
expire_page "/lists/show"
63 64 65 66 67 68 69 70 |
# File 'lib/action_controller/caching/pages.rb', line 63 def expire_page(path) return unless perform_caching path = page_cache_path(path) instrument_page_cache :expire_page, path do File.delete(path) if File.exist?(path) end end |