Setting model should use Rails.cache instead of class variable
|Target version:||Candidate for next major release|
Setting model uses two local class variables called
@cached_cleared_on to prevent reloading the settings from database and/or
settings.yml at every request.
Rails has been supporting different cache implementations for some time now, why not let the
Setting model use them as well? Besides the fact that this will help with tenant switching which we've implemented for Planio, it should also improve Redmine's performance when running it with more than processes and a custom cache mechanism, like memcached.
A patch is attached.