Fix #4117: Use memcache for fragment caching.
This commit is contained in:
@@ -2,9 +2,11 @@ Rails.application.configure do
|
|||||||
begin
|
begin
|
||||||
if Rails.env.test?
|
if Rails.env.test?
|
||||||
config.cache_store = :memory_store, { size: 32.megabytes }
|
config.cache_store = :memory_store, { size: 32.megabytes }
|
||||||
|
config.action_controller.cache_store = :memory_store, { size: 32.megabytes }
|
||||||
Rails.cache = ActiveSupport::Cache.lookup_store(Rails.application.config.cache_store)
|
Rails.cache = ActiveSupport::Cache.lookup_store(Rails.application.config.cache_store)
|
||||||
else
|
else
|
||||||
config.cache_store = :dalli_store, Danbooru.config.memcached_servers, { namespace: Danbooru.config.safe_app_name }
|
config.cache_store = :dalli_store, Danbooru.config.memcached_servers, { namespace: Danbooru.config.safe_app_name }
|
||||||
|
config.action_controller.cache_store = :dalli_store, Danbooru.config.memcached_servers, { namespace: Danbooru.config.safe_app_name }
|
||||||
Rails.cache = ActiveSupport::Cache.lookup_store(Rails.application.config.cache_store)
|
Rails.cache = ActiveSupport::Cache.lookup_store(Rails.application.config.cache_store)
|
||||||
|
|
||||||
Rails.cache.dalli.alive!
|
Rails.cache.dalli.alive!
|
||||||
|
|||||||
Reference in New Issue
Block a user