mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-15 17:44:46 +08:00
Switch to memory_store for caching in production [SCI-3182]
This commit is contained in:
parent
1da1558849
commit
8bec85c7b9
2 changed files with 2 additions and 5 deletions
|
@ -118,7 +118,7 @@ Rails.application.configure do
|
|||
if Rails.root.join('tmp/caching-dev.txt').exist?
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
config.cache_store = :memory_store
|
||||
config.cache_store = :memory_store, { size: (ENV['RAILS_MEM_CACHE_SIZE_MB'] || 32).to_i.megabytes }
|
||||
config.public_file_server.headers = {
|
||||
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
|
||||
}
|
||||
|
|
|
@ -78,9 +78,6 @@ Rails.application.configure do
|
|||
# Use a different logger for distributed setups.
|
||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||
|
||||
# Use a different cache store in production.
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||
# config.action_controller.asset_host = 'http://assets.example.com'
|
||||
|
||||
|
@ -129,7 +126,7 @@ Rails.application.configure do
|
|||
end
|
||||
|
||||
# Use a different cache store in production.
|
||||
# config.cache_store = :mem_cache_store
|
||||
config.cache_store = :memory_store, { size: (ENV['RAILS_MEM_CACHE_SIZE_MB'] || 32).to_i.megabytes }
|
||||
|
||||
# Use a real queuing backend for Active Job (and separate queues per environment)
|
||||
config.active_job.queue_adapter = :delayed_job
|
||||
|
|
Loading…
Add table
Reference in a new issue