instance method expire_page

Ruby on Rails 2.3.18

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(options = {})

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

expire_page :controller => "lists", :action => "show"

Parameters

options opt = {}
Source
# File actionpack/lib/action_controller/caching/pages.rb, line 112
      def expire_page(options = {})
        return unless perform_caching

        if options.is_a?(Hash)
          if options[:action].is_a?(Array)
            options[:action].dup.each do |action|
              self.class.expire_page(url_for(options.merge(:only_path => true, :skip_relative_url_root => true, :action => action)))
            end
          else
            self.class.expire_page(url_for(options.merge(:only_path => true, :skip_relative_url_root => true)))
          end
        else
          self.class.expire_page(options)
        end
      end

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

Defined in ActionController::Caching::Pages

Type at least 2 characters to search.

↑↓ navigate · open · esc close