Twig_Environment::getCache PHP Method

getCache() public method

public getCache ( )
    public function getCache()
    {
        return $this->cache;
    }

Same methods

Twig_Environment::getCache ( ) : string | false

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