Can I expire a cached page using a regex?


#1

I’m trying to expire all pages under my view action. These could
be /controller/view/1 or /controller/view/1/2

how can I expire all pages under /controller/view/? There must be a
way, but I’m stumped. Here’s my broken attempt. Thanks in advance for
any help,suggestions, or directions to a how to page.

expire_action(:controller => ‘/pragmatic’,
:action => ‘view’,
:id => %r{\d*},
:page => %r{\d*})


#2

Still no luck here. I’ve also tried this but all it did was expire the
view.html page
expire_action(:controller => ‘/pragmatic’,
:action => ‘view’)


#3

I’m interested in this as well… however for right now, I’ve taken this
approach and modified it to suit my needs:

http://www.fngtps.com/2006/01/lazy-sweeping-the-rails-page-cache


#4

Thanks, it seems that is the route I’ll go untill I figure out how to
just delete specific files under the public/controller/action directory.