Has anyone actually seen a before filter being called once an action
is cached with caches_action? When I try to use caches action, the
before filter is called only if the action hasn''t already been
cached. In other words, caches_action functions much like
caches_page. Here is some test code that shows the problem:
class TestCaseController < ApplicationController
caches_action :show
before_filter :my_filter
def my_filter
logger.info(''%%% hi'')
end
def show
render(:text=>''hello from show'')
end
end
If you put this into your controllers directory, start your server in
production mode, and go to http://localhost:3000/test_case/show, then
you will see the "hi" message in the log. However, if you hit reload,
the "hi" message does not appear a second time. Am I doing something
wrong?
Thanks,
--Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---