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

renderContentCacheEntryIdentifier() protected method

Renders an identifier for a content cache entry
protected renderContentCacheEntryIdentifier ( string $typoScriptPath, array $cacheIdentifierValues ) : string
$typoScriptPath string
$cacheIdentifierValues array
return string An MD5 hash built from the typoScriptPath and certain elements of the given identifier values
    protected function renderContentCacheEntryIdentifier($typoScriptPath, array $cacheIdentifierValues)
    {
        ksort($cacheIdentifierValues);
        $identifierSource = '';
        foreach ($cacheIdentifierValues as $key => $value) {
            if ($value instanceof CacheAwareInterface) {
                $identifierSource .= $key . '=' . $value->getCacheEntryIdentifier() . '&';
            } elseif (is_string($value) || is_bool($value) || is_integer($value)) {
                $identifierSource .= $key . '=' . $value . '&';
            } elseif ($value !== null) {
                throw new CacheException(sprintf('Invalid cache entry identifier @cache.entryIdentifier.%s for path "%s". A entry identifier value must be a string or implement CacheAwareInterface.', $key, $typoScriptPath), 1395846615);
            }
        }
        $identifierSource .= 'securityContextHash=' . $this->securityContext->getContextHash();
        return md5($typoScriptPath . '@' . $identifierSource);
    }