Bug in caches_action?

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs