Unable to clear cached pages

I am trying to utilize page caching in my application, and have done the following:

[code=]config.action_controller.perform_caching = true config.action_view.cache_template_extensions = false[/code] (What is that second setting above??)

In a controller with actions being cached: [code=]caches_page :index, :no_site[/code] In a controller where the cached pages need to get cleared: [code=]cache_sweeper :site_sweeper, :only => [:update][/code] And finally, the sweeper:

[code=]class SiteSweeper < ActionController::Caching::Sweeper   include ActionController::UrlWriter   include ActionController::Caching::Pages   observe Site # This sweeper is going to keep an eye on the Site model

  # If our sweeper detects that a Site was updated call this   def after_update(site)     if (site.is_production)       expire_cache_for(site)     end   end

  private   def expire_cache_for(site)

    puts "EXPIRING CACHED SITE FOR " + site.geocode

    # Expire the two cached actions for the home page (they hold a list of all active sites)     #expire_page(:controller => "/wibp_sites", :action => "index")     #expire_page(:controller => "/wibp_sites", :action => "no_site")     puts page_cache_path("index")     expire_page("index")     expire_page("wibp_sites/index")     expire_page("wibp_sites/no_site")

    # Expire all pages for the site, which include controller, action, and id (geocode)     expire_page(:controller => "/wibp_home", :action => "index", :id => site.geocode)     expire_page(:controller => "/wibp_calendar", :action => "index", :id => site.geocode)     expire_page(:controller => "/wibp_officers", :action => "index", :id => site.geocode)     expire_page(:controller => "/wibp_other_units", :action => "index", :id => site.geocode)     expire_page(:controller => "/wibp_links", :action => "index", :id => site.geocode)   end end[/code] As you can hopefully tell, i've tried various tactics to try to get pages swept, including the following versions of the expire_page method: [code=]expire_page(:controller => "wibp_sites", :action => "index") expire_page(:controller => "/wibp_sites", :action => "index") expire_page("/wibp_sites/index") expire_page("wibp_sites/index") expire_page("/wibp_sites/index.html")[/code] ..but nothing has resulted in the cached page files actually being removed (for the page in the example directly above, the cached page is stored at '/public/wibp_sites/index.html'). I have verified that the 'perform_caching' property is true, and the 'puts "EXPIRING CACHED SITE FOR " + site.geocode' line gets executed. Also, when the 'puts page_cache_path("index")' is executed it outputs 'nil'.

Finally, i've never seen the 'Expired page: ' output appear in the log file, and i've seen this in all the tutorials.

Can someone help me diagnose where i'm failing here?

Thanks for your time,

jesse

I'm not quite sure where to head with this (I use fragment caching) but:

-> Which version of Rails are you using? -> Do you see anything in the web server logs? Maybe the Rails login doesn't have the rights to dicker with files in the web server's cache folder? -> Perhaps your paths aren't equivalent? By that I mean that the path to the cached page isn't the same as the path you're attempting to expire with... -> Can you test this in development where you have (I hope) full control over the application stack?