mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Use our env naming convention for memcached
Also do not set memore_store in the production environment if there is no memcached. File based cache is default for a reason, it even works for most normal traffic pages
This commit is contained in:
parent
5aa85f233e
commit
4bf0c02763
2 changed files with 9 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue