Forum: Ruby on Rails Caching problem: expire_page not working

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Brent M. (Guest)
on 2006-03-09 02:28
Hi all,

I'm new to rails and I've run in to a rather insidious bug.  In
development (with caching turned on in development.rb), my app
successfully caches action "index" in controller "view":

class ViewController < ApplicationController
    caches_page :index
    def index
      # do the stuff that index does

I've got a sweeper running in a different controller ("admin") which
expires view::index when changes are made to the underlying data.  The
following line of codes in the sweeper don't seem to work:

  def expire_view(model)"Expiring the cached index")
    expire_page(:controller => "view", :action => "index")

Rather, I should say that "Expiring the cached index" is being logged
properly, but the page isn't being expired.  Am I missing something?


This topic is locked and can not be replied to.