Let’s say I have a hypothetical controller called ThingsController that exposes two actions: index and update which have the following routes:
GET /things ThingsController#index
PUT /things/1 ThingsController#update
Both actions respond to a JSON format, so you have GET /things.json and PUT things/1.json
I am caching the index action and the update action is expiring the index action as follows:
expire_action :action => :index
However when update occurs it does expire the default format for /things but it does not expire /things.json.
What do I need to do to make expire_action expire all formats? I can’t seem to find this anywhere in the documentation.
I don’t know of a better way than to explicitly expire each format unfortunately.