diff --git a/core/lib/Drupal/Core/Config/CachedStorage.php b/core/lib/Drupal/Core/Config/CachedStorage.php index 898a057..f98542f 100644 --- a/core/lib/Drupal/Core/Config/CachedStorage.php +++ b/core/lib/Drupal/Core/Config/CachedStorage.php @@ -16,7 +16,7 @@ * the cache and delegates the read to the storage on a cache miss. It also * handles cache invalidation. */ -class CachedStorage implements StorageInterface { +class CachedStorage implements StorageInterface, StorageCacheInterface { /** * The configuration storage to be cached. diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php index 264d59f..fe9f4cb 100644 --- a/core/lib/Drupal/Core/Config/ConfigFactory.php +++ b/core/lib/Drupal/Core/Config/ConfigFactory.php @@ -145,7 +145,7 @@ public function reset($name = NULL) { } // Clear the static list cache if supported by the storage. - if (method_exists($this->storage, 'resetListCache')) { + if ($this->storage instanceof StorageCacheInterface) { $this->storage->resetListCache(); } return $this; diff --git a/core/lib/Drupal/Core/Config/StorageCacheInterface.php b/core/lib/Drupal/Core/Config/StorageCacheInterface.php new file mode 100644 index 0000000..026875d --- /dev/null +++ b/core/lib/Drupal/Core/Config/StorageCacheInterface.php @@ -0,0 +1,20 @@ +