function Registry::setCache

Same name in other branches
  1. 9 core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::setCache()
  2. 10 core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::setCache()
  3. 11.x core/lib/Drupal/Core/Theme/Registry.php \Drupal\Core\Theme\Registry::setCache()

Persists the theme registry in the cache backend.

1 call to Registry::setCache()
Registry::get in core/lib/Drupal/Core/Theme/Registry.php
Returns the complete theme registry from cache or rebuilds it.

File

core/lib/Drupal/Core/Theme/Registry.php, line 268

Class

Registry
Defines the theme registry service.

Namespace

Drupal\Core\Theme

Code

protected function setCache() {
    $this->cache
        ->set('theme_registry:' . $this->theme
        ->getName(), $this->registry[$this->theme
        ->getName()], Cache::PERMANENT, [
        'theme_registry',
    ]);
}

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