Can't expire cached pages

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 < …
caches_page :index

def index
@blog_posts = Blog.find(:all, :limit => 10)
end

end

The following is what I have in the Admin::BlogPostController class

class Admin::BlogPostController < …
cache_sweeper :blog_post_sweeper, :only => [:create, :update,
:destroy]

end

And here is the sweeper:
class BlogPostSweeper < …
observe BlogPost

def after_save
expire_cache :controller => “public”, :action => “index”
end

end

As I mentioned earlier, I know that it is calling the sweeper method,
but fails to delete the cached file.

Any ideas?

Thanks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs