Added cache for application settings (Setting model).

Once the values are cached, only one database query is done at each user request (to check if the cache is still valid).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@685 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-08-31 17:45:32 +00:00
parent 404bfce446
commit 6bdc13b33d
3 changed files with 47 additions and 10 deletions
+1
View File
@@ -32,6 +32,7 @@ class ApplicationController < ActionController::Base
end
def user_setup
Setting.check_cache
if session[:user_id]
# existing session
User.current = User.find(session[:user_id])