I have a page where on the where the index
action shows a list of Posts, with custom sort columns, pagination, etc. Although I can cache every individual page / sort option with
cache(:direction => params[:direction], :sort => params[:sort], :page => params[:page]) do
I can't expire all of these at once using a single call to expire_action
(which is a problem). I know expire_action
has a regex option, but that is messy (using a regex to search for keys created with a hash), and I am using memcached which will not work.
How can I expire all the cache members of an action with a single call to expire_action
? If this is not possible, are there any other caching options you could recommend?