From 7fc01bb9ca84c2765e43d1a047cb467d89e99dec Mon Sep 17 00:00:00 2001 From: Jim Cottrell Date: Tue, 7 May 2019 12:34:46 -0600 Subject: [PATCH] Disable in-memory cache repository when running in CLI by default (#4323) Fixes #4057. Related https://github.com/octobercms/library/pull/401. Credit to @jimcottrell --- config/cache.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config/cache.php b/config/cache.php index 67d1929ef..251771724 100644 --- a/config/cache.php +++ b/config/cache.php @@ -99,9 +99,18 @@ return [ | | The request cache stores cache retrievals from the cache store | in memory to speed up consecutive retrievals within the same request. - | Set to true to disable this in-memory request cache. + | + | true - always disable this in-memory request cache + | + | false - always enable; be aware that long-running console commands + | (including queue workers) may retain cache entries in memory that + | have been changed in other processes or would have otherwise + | expired, causing issues with the `queue:restart` command, for + | example + | + | null - enable for HTTP requests, disable when running in CLI | */ - 'disableRequestCache' => false, + 'disableRequestCache' => null, ];