From eb4d9a4ffccc99f4d1e4ffb87c3c626c9e5a0c0b Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 13 Apr 2015 20:44:46 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=B0=86session=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=B7=A8=E5=AD=90=E5=9F=9F=E3=80=82=202.=20=E5=B0=86session?= =?UTF-8?q?=E7=9A=84=E5=AD=98=E5=82=A8=E6=94=B9=E5=88=B0files/cache=5Fstor?= =?UTF-8?q?e=E4=B8=8B=EF=BC=8C=E7=94=A8=E4=BA=8Enfs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/environments/development.rb | 2 +- config/environments/production.rb | 2 +- config/initializers/session_store.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 3b894d207..5c2427320 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -11,7 +11,7 @@ RedmineApp::Application.configure do # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false - config.cache_store = :file_store, "#{Rails.root }/public/tmp/" + config.cache_store = :file_store, "#{Rails.root }/files/cache_store/" # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = true diff --git a/config/environments/production.rb b/config/environments/production.rb index 48b2514cf..160e0b8b0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -19,7 +19,7 @@ RedmineApp::Application.configure do # Full error reports are disabled and caching is turned on config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly config.action_controller.perform_caching = true - config.cache_store = :file_store, "#{Rails.root }/public/tmp/" + config.cache_store = :file_store, "#{Rails.root }/files/cache_store/" # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 603b22a9f..3d06070a2 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1 +1 @@ -Rails.application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 20.minutes \ No newline at end of file +Rails.application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 20.minutes, :key => '_trustie_session', :domain => :all