You are here

protected function Registry::setCache in Drupal 9

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

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',
  ]);
}