Twig_Environment::getCache PHP Method

getCache() public method

Gets the cache directory or false if cache is disabled.
public getCache ( ) : string | false
return string | false
    public function getCache()
    {
        return $this->cache;
    }

Same methods

Twig_Environment::getCache ( )

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function compile($path, $reset = false)
 {
     if ($reset) {
         $cache = $this->twig->getCache();
         $this->twig->setCache(false);
     }
     $this->get($path);
     if ($reset && !empty($cache)) {
         //Restoring cache
         $this->twig->setCache($cache);
     }
 }
All Usage Examples Of Twig_Environment::getCache