diff --git a/core/lib/Drupal/Core/Config/CachedStorage.php b/core/lib/Drupal/Core/Config/CachedStorage.php index 2aa93e8..d753e78 100644 --- a/core/lib/Drupal/Core/Config/CachedStorage.php +++ b/core/lib/Drupal/Core/Config/CachedStorage.php @@ -120,7 +120,7 @@ public function write($name, array $data) { // While not all written data is read back, setting the cache instead of // just deleting it avoids cache rebuild stampedes. $this->cache->set($name, $data, CacheBackendInterface::CACHE_PERMANENT); - $this->cache->deleteTags(array('list_all' => TRUE)); + $this->cache->deleteTags(array('listAll' => TRUE)); $this->listAllCache = array(); return TRUE; } @@ -135,7 +135,7 @@ public function delete($name) { // rebuilding the cache before the storage is gone. if ($this->storage->delete($name)) { $this->cache->delete($name); - $this->cache->deleteTags(array('list_all' => TRUE)); + $this->cache->deleteTags(array('listAll' => TRUE)); $this->listAllCache = array(); return TRUE; } @@ -151,7 +151,7 @@ public function rename($name, $new_name) { if ($this->storage->rename($name, $new_name)) { $this->cache->delete($name); $this->cache->delete($new_name); - $this->cache->deleteTags(array('list_all' => TRUE)); + $this->cache->deleteTags(array('listAll' => TRUE)); $this->listAllCache = array(); return TRUE; } diff --git a/core/lib/Drupal/Core/Config/DatabaseStorage.php b/core/lib/Drupal/Core/Config/DatabaseStorage.php index 3d43a8c..5779b31 100644 --- a/core/lib/Drupal/Core/Config/DatabaseStorage.php +++ b/core/lib/Drupal/Core/Config/DatabaseStorage.php @@ -87,6 +87,29 @@ public function read($name) { } /** + * Implements Drupal\Core\Config\StorageInterface::read(). + * + * + * @param array $names + */ + public function readMultiple(array $names) { + // There are situations, like in the installer, where we may attempt a + // read without actually having the database available. In this case, + // catch the exception and just return an empty array so the caller can + // handle it if need be. + $list = array(); + try { + $list = $this->connection->query('SELECT name, data FROM {' . $this->connection->escapeTable($this->table) . '} WHERE name IN (:names)', array(':names' => $names), $this->options)->fetchAllKeyed(); + foreach ($list as &$data) { + $data = $this->decode($data); + } + } + catch (Exception $e) { + } + return $list; + } + + /** * Implements Drupal\Core\Config\StorageInterface::write(). * * @throws PDOException