method
expire_page
Ruby on Rails latest stable (v7.1.3.2)
-
1 note -
Class: ActionController::Caching::Pages
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (0)
- 2.0.3 (0)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (-2)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
expire_page(options = {})
public
Expires the page that was cached with the options as a key. Example:
expire_page :controller => "lists", :action => "show"
Register or
log in
to add new notes.
bjeanes -
August 28, 2008 - (v2.1.0)
3 thanks
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