Neos\Fusion\Core\Cache\ContentCache::replaceUncachedPlaceholders PHP Method

replaceUncachedPlaceholders() protected method

Replace segments which are marked as not-cacheable by their actual content by invoking the TypoScript Runtime.
protected replaceUncachedPlaceholders ( Closure $uncachedCommandCallback, string &$content ) : string
$uncachedCommandCallback Closure
$content string The content potentially containing not cacheable segments marked by the respective tokens
return string The original content, but with uncached segments replaced by the actual content
    protected function replaceUncachedPlaceholders(\Closure $uncachedCommandCallback, &$content)
    {
        $cache = $this->cache;
        $content = preg_replace_callback(self::EVAL_PLACEHOLDER_REGEX, function ($match) use($uncachedCommandCallback, $cache) {
            $command = $match['command'];
            $additionalData = json_decode($match['data'], true);
            return $uncachedCommandCallback($command, $additionalData, $cache);
        }, $content);
    }