For some reason I can not expire a cached page. I have created a
sweeper file and I know that the proper methods are being called. I
have also tried just moving the expire_page call into the controller
code, but it still doesn’t work.
The main page is cached with the following to create an index.html file
in the public dir:
class PublicController < …
@blog_posts = Blog.find(:all, :limit => 10)
The following is what I have in the Admin::BlogPostController class
class Admin::BlogPostController < …
cache_sweeper :blog_post_sweeper, :only => [:create, :update,
And here is the sweeper:
class BlogPostSweeper < …
expire_cache :controller => “public”, :action => “index”
As I mentioned earlier, I know that it is calling the sweeper method,
but fails to delete the cached file.