Project

General

Profile

Actions

Patch #8222

open

Setting model should use Rails.cache instead of class variable

Added by Jan from Planio www.plan.io over 13 years ago. Updated over 8 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Rails support
Start date:
2011-04-25
Due date:
% Done:

0%

Estimated time:

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.


Files

Actions

Also available in: Atom PDF