method
expire_page
v2.1.0 -
Show latest stable
- Class:
ActionController::Caching::Pages
expire_page(options = {})public
Expires the page that was cached with the options as a key. Example:
expire_page :controller => "lists", :action => "show"
1Note
When using RESTful routes
I had issues using +expire_page+ with RESTful controllers when expiring anything other than the index action because I was basing my +expire_page+ calls off this example.
The solution is to use +my_resource_path+ for example when +User+ with id 5 is updated, you would have to do:
expire_page user_path(user) # or
expire_page formatted_user_path(user, :xml)
This may apply to early versions but I have only tested on v2.1.0