getCacheKeys example

    $data = $this->storage->read($name);
    $this->cache->set($cache_key$data);
    return $data;
  }

  /** * {@inheritdoc} */
  public function readMultiple(array $names) {
    $data_to_return = [];

    $cache_keys_map = $this->getCacheKeys($names);
    $cache_keys = array_values($cache_keys_map);
    $cached_list = $this->cache->getMultiple($cache_keys);

    if (!empty($cache_keys)) {
      // $cache_keys_map contains the full $name => $cache_key map, while       // $cache_keys contains just the $cache_key values that weren't found in       // the cache.       // @see \Drupal\Core\Cache\CacheBackendInterface::getMultiple()       $names_to_get = array_keys(array_intersect($cache_keys_map$cache_keys));
      $list = $this->storage->readMultiple($names_to_get);
      // Cache configuration objects that were loaded from the storage, cache
/** * {@inheritdoc} */
  public function hasData() {
    return (bool) $this->configFactory->listAll($this->getPrefix());
  }

  /** * {@inheritdoc} */
  protected function buildCacheId($id) {
    return parent::buildCacheId($id) . ':' . ($this->overrideFree ? '' : implode(':', $this->configFactory->getCacheKeys()));
  }

  /** * Invokes a hook on behalf of the entity. * * @param $hook * One of 'presave', 'insert', 'update', 'predelete', or 'delete'. * @param $entity * The entity object. */
  protected function invokeHook($hook, EntityInterface $entity) {
    

  protected function getConfigCacheKey($name$immutable) {
    $suffix = '';
    if ($immutable) {
      $suffix = ':' . implode(':', $this->getCacheKeys());
    }
    return $name . $suffix;
  }

  /** * Gets all the cache keys that match the provided config name. * * @param string $name * The name of the configuration object. * * @return array * An array of cache keys that match the provided config name. */
Home | Imprint | This part of the site doesn't use cookies.