- /**
- * Retrieve settings for all cache front-ends known to the system
- *
- * @return array Format: array('<frontend_id>' => array(<cache_settings>), ...)
- */
- protected function _getCacheSettings()
- {
- /*
- * Merging is intentionally implemented through array_replace_recursive() instead of array_merge(), because even
- * though some settings may become irrelevant when the cache storage type is changed, they don't do any harm
- * and can be overwritten when needed.
- * Also array_merge leads to unexpected behavior, for for example by dropping the
- * default cache_dir setting from di.xml when a cache id_prefix is configured in app/etc/env.php.
- */
- $cacheInfo = $this->deploymentConfig->getConfigData(FrontendPool::KEY_CACHE);
- if (null !== $cacheInfo && array_key_exists(FrontendPool::KEY_FRONTEND_CACHE, $cacheInfo)) {
- return array_replace_recursive($this->_frontendSettings, $cacheInfo[FrontendPool::KEY_FRONTEND_CACHE]);
- }
- return $this->_frontendSettings;
- }