Topic: expire_page not removing cached file?

I have a javascripts controller which I am using to dynamically generate .js "files", but I find that when I enable caching the public/javascripts/home.js file that is generated never gets destroyed from my sweeper...

class JavascriptsController < ApplicationController

  caches_page :home

  def home
    @data_for_js = Blah.some_stuff


class ProductSweeper < ActionController::Caching::Sweeper
  observe Product

  def after_save(product)
    puts "here..."
    expire_page(:controller => "javascripts", :action => "home", :format => 'js')


I see in my log "here..." when a product is created, but the expire_page method doesn't seem to be doing anything...  Can anyone think of what the problem might be?  I know I can solve this by doing File.delete and just remove the cached file..  but I'd rather rely on rail's expire_page method to do that fore me........


Last edited by patrick99e99 (2011-10-23 02:19:26)