Patch #8222
Setting model should use Rails.cache instead of class variable
| Status: | New | Start date: | 2011-04-25 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | Rails support | |||
| Target version: | Candidate for next major release |
Description
The Setting model uses two local class variables called @cached_settings and @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.
History
#1 Updated by Etienne Massip about 2 years ago
- Target version set to Candidate for next major release
#2 Updated by Anuj Sapkota about 2 years ago
- Status changed from New to Resolved
- Assignee set to Jim Mulholland
dsadaasdsadasdasdadasd
#3 Updated by Jan from Planio www.plan.io about 2 years ago
?? :-)
how were you even able to update this ticket?
#4 Updated by Etienne Massip about 2 years ago
- Status changed from Resolved to New
- Assignee deleted (
Jim Mulholland)
#5 Updated by Toshi MARUYAMA almost 2 years ago
- File rails-cache.diff
added
This is patch series from https://www.chiliproject.org/issues/350
#6 Updated by Etienne Massip almost 2 years ago
Chiliproject looks to add a lot of code complexity and we should not need to change tests, Jan's patch, on the other side, is pretty clean.
Should settings be cached separately or could the full Hash of Settings be cached instead ?