companygardener/lookup_by — pull request #23 by companygardener (2014-08-08 19:13:09+00:00)
Title: Fix logic to select SafeLRU when using Rails 4

Modified commit below from @mlarraz.

> Currently, whether to use thread safe caching or not is determined by
> calling Rails.configuration.allow_concurrency.
>
> This is set inside config.threadsafe!, which is deprecated in Rails 4.
>
> Thread safety is turned on by default in Rails 4, as long as
> config.cache_classes and config.eager_load are both true.
>
> This pull requests allow Rails 4 apps to use SafeLRU without setting
> deprecated config options.
>
> References:
> http://tenderlovemaking.com/2012/06/18/removing-config-threadsafe.html
> rails/rails@5d416b9