Configure cache stores
rely on RAM caching for devel, and optionally a memcached server in production
This commit is contained in:
parent
e60dc8c09d
commit
7f2346650f
4 changed files with 15 additions and 0 deletions
|
|
@ -46,6 +46,14 @@ 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"]
|
||||
}
|
||||
else
|
||||
config.cache_store = :memory_store, { size: 64.megabytes }
|
||||
end
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
||||
# config.action_controller.asset_host = "http://assets.example.com"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue