Fix #4117: Use memcache for fragment caching.

This commit is contained in:
evazion 2019-08-04 21:10:57 -05:00 committed by Kira
parent ec0ae03aef
commit 725d6489d1

View File

@ -2,9 +2,11 @@ Rails.application.configure do
begin
if Rails.env.test?
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)
else
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.dalli.alive!