You are here

protected function CachedStorage::getCacheKeys in Drupal 9

Same name and namespace in other branches
  1. 8 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);
}