instance method expire_page

Ruby on Rails 2.2.3

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 65
        def expire_page(path)
          return unless perform_caching

          benchmark "Expired page: #{page_cache_file(path)}" do
            File.delete(page_cache_path(path)) if File.exist?(page_cache_path(path))
          end
        end

Defined in actionpack/lib/action_controller/caching/pages.rb line 65 · 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