I’ve set up action caching (with sweepers, but I guess that’s irrelevant here) in my app, and so far it works great except for one thing:
I use Kaminari for pagination, and thus when I execute expire_action on my action it only expires the first page. As I know caching won’t work when using the query string for specifying the page, I’ve set up a route so the pages are appended to the end of the url (for example /people/123/page/2).
I’ll add more info to this post if necessary, but I’m guessing there is something obvious I’m missing here, so: Anyone know how to expire the rest of my pages?
I’m still interested in an answer to my original question and will change my accepted answer should a solution come up. That said, I ended up only caching the original page by checking if a page was specified at all:
caches_action :index, :if => Proc.new { params[:page].nil? }