instance method expire_page

Ruby on Rails 3.1.12

Since v2.2.3 Last seen in v3.2.22.5

Available in: v2.2.3 v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

expire_page(path)

Expires the page that was cached with the path as a key. Example:

expire_page "/lists/show"

Parameters

path req
Source
# File actionpack/lib/action_controller/caching/pages.rb, line 62
        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

Defined in actionpack/lib/action_controller/caching/pages.rb line 62 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActionController::Caching::Pages::ClassMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close