Use :file_store cache store in development

:memory_store uses the process' memory and therefore, what the
background job writes is not reachable for the rails server process when
it reads from the cache. See
https://github.com/openfoodfoundation/openfoodnetwork/wiki/Products-cache#development.
This commit is contained in:
Pau Perez
2019-03-08 12:57:54 +01:00
parent 10a79d5a65
commit 15a95a3bf5

View File

@@ -5,7 +5,9 @@ Openfoodnetwork::Application.configure do
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
config.cache_store = :memory_store
# :file_store is used by default when no cache store is specifically configured.
# config.cache_store = :file_store
# Enable cache instrumentation, which is disabled by default
ActiveSupport::Cache::Store.instrument = true