diff --git a/core/lib/Drupal/Core/Config/CachedStorage.php b/core/lib/Drupal/Core/Config/CachedStorage.php index f290843..898a057 100644 --- a/core/lib/Drupal/Core/Config/CachedStorage.php +++ b/core/lib/Drupal/Core/Config/CachedStorage.php @@ -207,4 +207,11 @@ public function deleteAll($prefix = '') { } return FALSE; } + + /** + * Clears the static list cache. + */ + public function resetListCache() { + static::$listAllCache = array(); + } } diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php index 21940d9..264d59f 100644 --- a/core/lib/Drupal/Core/Config/ConfigFactory.php +++ b/core/lib/Drupal/Core/Config/ConfigFactory.php @@ -143,6 +143,11 @@ public function reset($name = NULL) { else { $this->cache = array(); } + + // Clear the static list cache if supported by the storage. + if (method_exists($this->storage, 'resetListCache')) { + $this->storage->resetListCache(); + } return $this; }