This function will add a start and an end token to the beginning and end of the content and generate a cache
identifier based on the current TypoScript path and additional values which were defined in the TypoScript
configuration by the site integrator.
The whole cache segment (START TOKEN + IDENTIFIER + SEPARATOR TOKEN + original content + END TOKEN) is returned
as a string.
This method is called by the TypoScript Runtime while rendering a TypoScript object.
public createCacheSegment ( string $content, string $typoScriptPath, array $cacheIdentifierValues, array $tags = [], integer $lifetime = null ) : string | ||
$content | string | The (partial) content which should potentially be cached later on |
$typoScriptPath | string | The TypoScript path that rendered the content, for example "page |
$cacheIdentifierValues | array | The values (simple type or implementing CacheAwareInterface) that should be used to create a cache identifier, will be sorted by keys for consistent ordering |
$tags | array | Tags to add to the cache entry |
$lifetime | integer | Lifetime of the cache segment in seconds. NULL for the default lifetime and 0 for unlimited lifetime. |
return | string | The original content, but with additional markers and a cache identifier added |