How to expire a directory in Rails?
I have a blog where /posts/ lists all the posts. Controller posts, action index. Pretty standard stuff.
Posts are paginated in groups of 10 using will_paginate.
The pages are being cached like this:
/posts/
/posts/index/2
/posts/index/3
/posts/index/4
...
/posts/index/134
/posts/index/135
...
etc..
When I need to expire this pages, expire_page(posts_path) won't do the job, it will only expire /posts.html.
What's the best way to expire the paginated pages? Since there is an undetermined number of pages, should I just expire the whole /posts/index/ directory? How can I expire a directory?
thanks