companygardener/lookup_by — pull request #22 by mlarraz (2014-07-28 19:35:25+00:00)
Title: Use SafeLRU on Rails 4

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
https://github.com/rails/rails/commit/5d416b907864d99af55ebaa400fff217e17570cd