Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Environment.php

function Environment::getCache

Gets the current cache implementation.

Parameters

bool $original Whether to return the original cache option or the real cache instance:

Return value

CacheInterface|string|false A Twig\Cache\CacheInterface implementation, an absolute path to the compiled templates, or false to disable cache

File

vendor/twig/twig/src/Environment.php, line 259

Class

Environment
Stores the Twig configuration and renders templates.

Namespace

Twig

Code

public function getCache($original = true) {
    return $original ? $this->originalCache : $this->cache;
}
RSS feed
Powered by Drupal