From 407057a159699b740af3cfb5764d0eae356e3047 Mon Sep 17 00:00:00 2001 From: Lee Rowlands Date: Fri, 22 Jul 2022 07:04:39 +1000 Subject: [PATCH] Issue #2820580 by anavarre, hardikpandya, Wim Leers, Berdir, cilefen: Drupal >=8.2.x doesn't allow to override all cache bins with $settings['cache']['default'] anymore, documentation says otherwise (cherry picked from commit 28aebfd6853d0b9e046bb6420a6e99708b4bee32) --- core/core.api.php | 7 ++++--- core/lib/Drupal/Core/Cache/CacheFactory.php | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/core/core.api.php b/core/core.api.php index a7662f8362a..d99e96715f3 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -584,9 +584,10 @@ * * @section configuration Configuration * - * By default cached data is stored in the database. This can be configured - * though so that all cached data, or that of an individual cache bin, uses a - * different cache backend, such as APCu or Memcache, for storage. + * By default, cached data is stored in the database. However, Drupal can be + * configured to use a different backend (specified in their service + * definition), e.g. APCu or Memcache. This configuration can nominate a + * different backend for all cached data or for specific cache bins. * * In a settings.php file, you can override the service used for a particular * cache bin. For example, if your service implementation of diff --git a/core/lib/Drupal/Core/Cache/CacheFactory.php b/core/lib/Drupal/Core/Cache/CacheFactory.php index 5adfb307183..eefbbae5d4f 100644 --- a/core/lib/Drupal/Core/Cache/CacheFactory.php +++ b/core/lib/Drupal/Core/Cache/CacheFactory.php @@ -23,11 +23,11 @@ class CacheFactory implements CacheFactoryInterface, ContainerAwareInterface { /** * A map of cache bin to default cache backend service name. * - * All mappings in $settings takes precedence over this, but this can be used - * to optimize cache storage for a Drupal installation without cache - * customizations in settings.php. For example, this can be used to map the - * 'bootstrap' bin to 'cache.backend.chainedfast', while allowing other bins - * to fall back to the global default of 'cache.backend.database'. + * All bin-specific mappings in $settings take precedence over this, but it + * can be used to optimize cache storage for a Drupal installation without + * cache customizations in settings.php. For example, this can be used to map + * the 'bootstrap' bin to 'cache.backend.chainedfast', while allowing other + * bins to fall back to the global default of 'cache.backend.database'. * * @var array */