PHP Класс Neos\Fusion\Core\Cache\RuntimeContentCache

Holds cache related runtime state.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$addCacheSegmentMarkersToPlaceholders boolean
$cacheMetadata array Stack of cached segment metadata (lifetime)
$contentCache ContentCache
$enableContentCache boolean
$inCacheEntryPoint boolean
$propertyMapper Neos\Flow\Property\PropertyMapper
$runtime Neos\Fusion\Core\Runtime
$tags array

Открытые методы

Метод Описание
__construct ( Runtime $runtime )
addTag ( string $key, string $value ) : void Adds a tag built from the given key and value.
enter ( array $configuration, string $typoScriptPath ) : array Enter an evaluation
evaluateUncached ( string $path, array $contextArray ) : mixed Evaluate a TypoScript path with a given context without content caching
getEnableContentCache ( ) : boolean
leave ( array $evaluateContext ) : void Leave the evaluation of a path
postProcess ( array $evaluateContext, object $tsObject, mixed $output ) : mixed Post process output for caching information
preEvaluate ( array &$evaluateContext, object $tsObject ) : array Check for cached evaluation and or collect metadata for evaluation
setEnableContentCache ( boolean $enableContentCache ) : void
unserializeContext ( array $contextArray ) : array

Защищенные методы

Метод Описание
buildCacheIdentifierValues ( array $configuration, string $typoScriptPath, object $tsObject ) : array Builds an array of additional key / values which must go into the calculation of the cache entry identifier for a cached content segment.
buildCacheTags ( array $configuration, string $typoScriptPath, object $tsObject ) : array Builds an array of string which must be used as tags for the cache entry identifier of a specific cached content segment.
flushTags ( ) : array Resets the assigned tags, returning the previously set tags.

Описание методов

__construct() публичный Метод

public __construct ( Runtime $runtime )
$runtime Neos\Fusion\Core\Runtime

addTag() публичный Метод

Adds a tag built from the given key and value.
public addTag ( string $key, string $value ) : void
$key string
$value string
Результат void

buildCacheIdentifierValues() защищенный Метод

Builds an array of additional key / values which must go into the calculation of the cache entry identifier for a cached content segment.
protected buildCacheIdentifierValues ( array $configuration, string $typoScriptPath, object $tsObject ) : array
$configuration array
$typoScriptPath string
$tsObject object The actual TypoScript object
Результат array

buildCacheTags() защищенный Метод

Builds an array of string which must be used as tags for the cache entry identifier of a specific cached content segment.
protected buildCacheTags ( array $configuration, string $typoScriptPath, object $tsObject ) : array
$configuration array
$typoScriptPath string
$tsObject object The actual TypoScript object
Результат array

enter() публичный Метод

Needs to be called right before evaluation of a path starts to check the cache mode and set internal state like the cache entry point.
public enter ( array $configuration, string $typoScriptPath ) : array
$configuration array
$typoScriptPath string
Результат array An evaluate context array that needs to be passed to subsequent calls to pass the current state

evaluateUncached() публичный Метод

This is used to render uncached segments "out of band" in getCachedSegment of ContentCache.
public evaluateUncached ( string $path, array $contextArray ) : mixed
$path string
$contextArray array
Результат mixed TODO Find another way of disabling the cache (especially to allow cached content inside uncached content)

flushTags() защищенный Метод

Resets the assigned tags, returning the previously set tags.
protected flushTags ( ) : array
Результат array

getEnableContentCache() публичный Метод

public getEnableContentCache ( ) : boolean
Результат boolean

leave() публичный Метод

Has to be called in the same function calling enter() for every return path.
public leave ( array $evaluateContext ) : void
$evaluateContext array The current evaluation context
Результат void

postProcess() публичный Метод

The content cache stores cache segments with markers inside the generated content. This method creates cache segments and will process the final outer result (currentPathIsEntryPoint) to remove all cache markers and store cache entries.
public postProcess ( array $evaluateContext, object $tsObject, mixed $output ) : mixed
$evaluateContext array The current evaluation context
$tsObject object The current TypoScript object (for "this" in evaluations)
$output mixed The generated output after caching information was removed
Результат mixed The post-processed output with cache segment markers or cleaned for the entry point

preEvaluate() публичный Метод

Try to get a cached segment for the current path and return that with all uncached segments evaluated if it exists. Otherwise metadata for the cache lifetime is collected (if configured) for nested evaluations (to find the minimum maximumLifetime).
public preEvaluate ( array &$evaluateContext, object $tsObject ) : array
$evaluateContext array The current evaluation context
$tsObject object The current TypoScript object (for "this" in evaluations)
Результат array Cache hit state as boolean and value as mixed

setEnableContentCache() публичный Метод

public setEnableContentCache ( boolean $enableContentCache ) : void
$enableContentCache boolean
Результат void

unserializeContext() публичный Метод

public unserializeContext ( array $contextArray ) : array
$contextArray array
Результат array

Описание свойств

$addCacheSegmentMarkersToPlaceholders защищенное свойство

protected bool $addCacheSegmentMarkersToPlaceholders
Результат boolean

$cacheMetadata защищенное свойство

Stack of cached segment metadata (lifetime)
protected array $cacheMetadata
Результат array

$contentCache защищенное свойство

protected ContentCache,Neos\Fusion\Core\Cache $contentCache
Результат ContentCache

$enableContentCache защищенное свойство

protected bool $enableContentCache
Результат boolean

$inCacheEntryPoint защищенное свойство

protected bool $inCacheEntryPoint
Результат boolean

$propertyMapper защищенное свойство

protected PropertyMapper,Neos\Flow\Property $propertyMapper
Результат Neos\Flow\Property\PropertyMapper

$runtime защищенное свойство

protected Runtime,Neos\Fusion\Core $runtime
Результат Neos\Fusion\Core\Runtime

$tags защищенное свойство

protected array $tags
Результат array