diff --git a/config/environments/production.rb b/config/environments/production.rb index 357dcb55..7291c6fa 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -50,13 +50,11 @@ Osem::Application.configure do # Use a different cache store in production # config.cache_store = :mem_cache_store - if ENV["MEMCACHEDCLOUD_SERVERS"] - config.cache_store = :dalli_store, ENV["MEMCACHEDCLOUD_SERVERS"].split(','), { - username: ENV["MEMCACHEDCLOUD_USERNAME"], - password: ENV["MEMCACHEDCLOUD_PASSWORD"] + if ENV["OSEM_MEMCACHED_SERVERS"] + config.cache_store = :mem_cache_store, ENV["OSEM_MEMCACHED_SERVERS"].split(','), { + username: ENV["OSEM_MEMCACHED_USERNAME"], + password: ENV["OSEM_MEMCACHED_PASSWORD"] } - else - config.cache_store = :memory_store, { size: 64.megabytes } end # Enable serving of images, stylesheets, and JavaScripts from an asset server diff --git a/dotenv.example b/dotenv.example index 17877760..ca6bbfa8 100644 --- a/dotenv.example +++ b/dotenv.example @@ -27,6 +27,11 @@ # The name of the database # OSEM_DB_NAME=osem_production +# The memached servers to use, default is a file based cache +# OSEM_MEMCACHED_SERVERS='cache-1.example.com,cache-2.example.com' +# OSEM_MEMCACHED_USERNAME='root' +# OSEM_MEMCACHED_PASSWORD='1234' + # The ruby version to use # OSEM_RUBY_VERSION=2.5.0