Hello all,
I am running a blog system which has its “/” (home page) cached like
this:
class ApplicationController < ActionController::Base
before_filter :index_cache_expirer, :only => [:index]
caches_action :index
so the site’s top page is caches for 60 seconds in my case
(index_cache_expirer is a home-made function to expire)
on the site, there is also a multi-user /admin area, which in turn has
its own controllers with :index action.
The problem is that effect of “caches_action :index” directive, which
is set inside the application.rb, somehow gets propagated to, say,
:index action of admin/posts controller, which causes problems because
a user is sometimes served by a page, which was cached by another user!
(like, logging in and checking his own posts list, just to be served by
a cached posts list, which was created for another user)
I might not be doing the caching the right way or something, but is
there a way to turn off that caches_action directive propagation to
“lower” level of the site (i.e. just make it work ONLY for the
application controller’s :index action, where it was defined in?)
Any suggestions are very appreciated as my site is now running with
caching off while I’m trying to find a good solution for the problem.
TIA,
Mike