#50 new
Will Mernagh

Caching Issue with before_filter

Reported by Will Mernagh | February 12th, 2010 @ 11:33 AM

I have an application called Foo that uses an application called Bar as a plugin via engines.

Foo::ApplicationController extends Bar::ApplicationController which extends ActionsController::Base

Everything works fine except for the before filters.The filters defined in Bar::ApplicationController get cached and reread in development mode.

This results in the filter being called
once for the first request
twice for the second request
trice for the third request

So on the 1000th request the filters will get run 1000 times. This only happens for the filters in the plugin directory.

I suspect that somehow the filters are cached but added to each time a request is made. This is not a problem if I turn on caching in Development mode or if I use production mode (obviously).

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The rails engines plugin itself

Shared Ticket Bins

People watching this ticket