mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Configure dalli store value max bytes from env variable
This commit is contained in:
@@ -56,3 +56,5 @@ SMTP_PASSWORD: 'f00d'
|
||||
# STRIPE_INSTANCE_PUBLISHABLE_KEY: "pk_test_xxxx" # This can be a test key or a live key
|
||||
# STRIPE_CLIENT_ID: "ca_xxxx" # This can be a development ID or a production ID
|
||||
# STRIPE_ENDPOINT_SECRET: "whsec_xxxx"
|
||||
|
||||
MEMCACHED_VALUE_MAX_MEGABYTES: 4
|
||||
|
||||
@@ -40,7 +40,9 @@ Openfoodnetwork::Application.configure do
|
||||
# config.logger = SyslogLogger.new
|
||||
|
||||
# Use a different cache store in production
|
||||
config.cache_store = :dalli_store
|
||||
memcached_value_max_megabytes = ENV.fetch("MEMCACHED_VALUE_MAX_MEGABYTES", 1).to_i
|
||||
memcached_value_max_bytes = memcached_value_max_megabytes * 1024 * 1024
|
||||
config.cache_store = :dalli_store, { value_max_bytes: memcached_value_max_bytes }
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
@@ -40,7 +40,9 @@ Openfoodnetwork::Application.configure do
|
||||
# config.logger = SyslogLogger.new
|
||||
|
||||
# Use a different cache store in production
|
||||
config.cache_store = :dalli_store
|
||||
memcached_value_max_megabytes = ENV.fetch("MEMCACHED_VALUE_MAX_MEGABYTES", 1).to_i
|
||||
memcached_value_max_bytes = memcached_value_max_megabytes * 1024 * 1024
|
||||
config.cache_store = :dalli_store, { value_max_bytes: memcached_value_max_bytes }
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
||||
Reference in New Issue
Block a user