diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2015-05-01 00:00:01 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2015-05-01 00:00:01 +0900 |
commit | 115906c207c12076bac3f64b132385ea3080a7da (patch) | |
tree | 3af0a3b563ea68cde9e9e932b27c2c1a75625b22 | |
parent | f4c0b6d1bf7a73b5e0600abbdbd5f6c668c10149 (diff) | |
download | aclog-115906c207c12076bac3f64b132385ea3080a7da.tar.gz |
web: cache: set default expire time
-rw-r--r-- | config/environments/production.rb | 2 | ||||
-rw-r--r-- | config/initializers/session_store.rb | 2 | ||||
-rw-r--r-- | config/settings.yml.example | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/config/environments/production.rb b/config/environments/production.rb index 80f0ad3..72c59f1 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -55,7 +55,7 @@ Rails.application.configure do # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. - config.cache_store = :dalli_store, Settings.cache.memcached, { namespace: "aclog-web:", pool_size: 5 } + config.cache_store = :dalli_store, Settings.cache.memcached, { namespace: "aclog-web:", pool_size: 5, expires_in: Settings.cache.expires_in } # 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 2a6c895..1b9b175 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,3 +1,3 @@ # Be sure to restart your server when you modify this file. -Rails.application.config.session_store :cache_store +Rails.application.config.session_store :cache_store, expire_after: nil diff --git a/config/settings.yml.example b/config/settings.yml.example index b1eeba2..f949909 100644 --- a/config/settings.yml.example +++ b/config/settings.yml.example @@ -35,6 +35,7 @@ default: &default count: 50 cache: + expires_in: 900 stats: 900 # sec friends: 3600 memcached: "127.0.0.1:11211" |