function CachedStorage::getCacheKeys

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/CachedStorage.php \Drupal\Core\Config\CachedStorage::getCacheKeys()
  2. 10 core/lib/Drupal/Core/Config/CachedStorage.php \Drupal\Core\Config\CachedStorage::getCacheKeys()
  3. 11.x core/lib/Drupal/Core/Config/CachedStorage.php \Drupal\Core\Config\CachedStorage::getCacheKeys()

Returns a cache key map for an array of configuration names.

Parameters

array $names: The configuration names.

Return value

array An array of cache keys keyed by configuration names.

2 calls to CachedStorage::getCacheKeys()
CachedStorage::deleteAll in core/lib/Drupal/Core/Config/CachedStorage.php
Deletes configuration objects whose names start with a given prefix.
CachedStorage::readMultiple in core/lib/Drupal/Core/Config/CachedStorage.php
Reads configuration data from the storage.

File

core/lib/Drupal/Core/Config/CachedStorage.php, line 279

Class

CachedStorage
Defines the cached storage.

Namespace

Drupal\Core\Config

Code

protected function getCacheKeys(array $names) {
    $prefix = $this->getCollectionPrefix();
    $cache_keys = array_map(function ($name) use ($prefix) {
        return $prefix . $name;
    }, $names);
    return array_combine($names, $cache_keys);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.