mperham/dalli — pull request #284 by brianmario (2012-11-11 09:43:12+00:00)
Title: Always instrument ActiveSupport client

ActiveSupport is doing this check too, but it's actually a bug because the variable is stored as a thread-local and defaults to false which means on a multi-threaded webserver the value will _always_ be false unless you set it at the top of every request. I've been meaning to send a pull to Rails doing this same thing but haven't had the time.

The check was put in before ActiveSupport::Instrumentation was changed to not actually do any work unless there were subscribers setup listening for the events. So to "disable" this instrumentation all the application needs to do is not subscribe to these events. Rails doesn't by default, meaning this is "disabled" by default.