setEnableContentCache() public method

If the TypoScript content cache should be enabled at all
public setEnableContentCache ( boolean $flag ) : void
$flag boolean
return void
 /**
  * Handle an Exception thrown while rendering TypoScript
  *
  * @param string $typoScriptPath
  * @param \Exception $exception
  * @return string
  * @throws StopActionException|SecurityException
  */
 public function handleRenderingException($typoScriptPath, \Exception $exception)
 {
     if ($exception instanceof StopActionException || $exception instanceof SecurityException) {
         throw $exception;
     }
     if ($exception instanceof Exceptions\RuntimeException) {
         $typoScriptPath = $exception->getTypoScriptPath();
         $exception = $exception->getPrevious();
     }
     if ($this->exceptionDisablesCache($typoScriptPath, $exception)) {
         $this->runtime->setEnableContentCache(false);
     }
     $referenceCode = $exception instanceof \Neos\Flow\Exception ? $exception->getReferenceCode() : null;
     return $this->handle($typoScriptPath, $exception, $referenceCode);
 }
コード例 #2
0
 /**
  * @param NodeInterface $currentSiteNode
  * @return \Neos\Fusion\Core\Runtime
  */
 protected function getTypoScriptRuntime(NodeInterface $currentSiteNode)
 {
     if ($this->typoScriptRuntime === null) {
         $this->typoScriptRuntime = $this->typoScriptService->createRuntime($currentSiteNode, $this->controllerContext);
         if (isset($this->options['enableContentCache']) && $this->options['enableContentCache'] !== null) {
             $this->typoScriptRuntime->setEnableContentCache($this->options['enableContentCache']);
         }
     }
     return $this->typoScriptRuntime;
 }
コード例 #3
0
 /**
  * Load the TypoScript Files form the defined
  * paths and construct a Runtime from the
  * parsed results
  *
  * @return void
  */
 public function initializeTypoScriptRuntime()
 {
     if ($this->typoScriptRuntime === null) {
         $this->loadTypoScript();
         $this->typoScriptRuntime = new Runtime($this->parsedTypoScript, $this->controllerContext);
     }
     if (isset($this->options['debugMode'])) {
         $this->typoScriptRuntime->setDebugMode($this->options['debugMode']);
     }
     if (isset($this->options['enableContentCache'])) {
         $this->typoScriptRuntime->setEnableContentCache($this->options['enableContentCache']);
     }
 }