You are here

protected function DefaultPluginManager::cacheSet in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Component/Plugin/DefaultPluginManager.php \Drupal\Core\Plugin\DefaultPluginManager::cacheSet()

Stores data in the persistent cache, respecting the use caches flag.

See also

\Drupal\Core\Cache\CacheBackendInterface::set()

1 call to DefaultPluginManager::cacheSet()
DefaultPluginManager::setCachedDefinitions in lib/Drupal/Component/Plugin/DefaultPluginManager.php
Sets a cache of plugin definitions for the decorated discovery class.

File

lib/Drupal/Component/Plugin/DefaultPluginManager.php, line 256
Contains \Drupal\Core\Plugin\DefaultPluginManager.

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

protected function cacheSet($cid, $data, $expire = Cache::PERMANENT, array $tags = array()) {
  if ($this->cacheBackend && $this->useCaches) {
    $this->cacheBackend
      ->set($cid, $data, $expire, $tags);
  }
}