Neos\Fusion\Core\Runtime::evaluateObjectOrRetrieveFromCache PHP Method

evaluateObjectOrRetrieveFromCache() protected method

Does the evaluation of a TypoScript instance, first checking the cache and if conditions and afterwards applying processors.
protected evaluateObjectOrRetrieveFromCache ( AbstractTypoScriptObject $typoScriptObject, string $typoScriptPath, array $typoScriptConfiguration, array $cacheContext ) : mixed
$typoScriptObject Neos\Fusion\TypoScriptObjects\AbstractTypoScriptObject
$typoScriptPath string
$typoScriptConfiguration array
$cacheContext array
return mixed
    protected function evaluateObjectOrRetrieveFromCache($typoScriptObject, $typoScriptPath, $typoScriptConfiguration, $cacheContext)
    {
        $output = null;
        $evaluationStatus = self::EVALUATION_SKIPPED;
        list($cacheHit, $cachedResult) = $this->runtimeContentCache->preEvaluate($cacheContext, $typoScriptObject);
        if ($cacheHit) {
            return $cachedResult;
        }
        $evaluateObject = true;
        if ($this->evaluateIfCondition($typoScriptConfiguration, $typoScriptPath, $typoScriptObject) === false) {
            $evaluateObject = false;
        }
        if ($evaluateObject) {
            $output = $typoScriptObject->evaluate();
            $evaluationStatus = self::EVALUATION_EXECUTED;
        }
        $this->lastEvaluationStatus = $evaluationStatus;
        if ($evaluateObject) {
            $output = $this->evaluateProcessors($output, $typoScriptConfiguration, $typoScriptPath, $typoScriptObject);
        }
        $output = $this->runtimeContentCache->postProcess($cacheContext, $typoScriptObject, $output);
        return $output;
    }