RuntimeContentCache
class RuntimeContentCache (View source)
Integrate the ContentCache into the Fusion Runtime
Holds cache related runtime state.
Properties
protected Runtime | $runtime | ||
protected bool | $enableContentCache | ||
protected bool|null | $inCacheEntryPoint | ||
protected bool | $addCacheSegmentMarkersToPlaceholders | ||
protected array | $cacheMetadata | Stack of cached segment metadata (lifetime) |
|
protected ContentCache | $contentCache | ||
protected array | $tags | ||
protected PropertyMapper | $propertyMapper |
Methods
Adds a tag built from the given key and value.
Resets the assigned tags, returning the previously set tags.
Enter an evaluation
Check for cached evaluation and or collect metadata for evaluation
Post process output for caching information
Leave the evaluation of a path
Evaluate a Fusion path with a given context without content caching
Builds an array of additional key / values which must go into the calculation of the cache entry identifier for a cached content segment.
Builds an array of string which must be used as tags for the cache entry identifier of a specific cached content segment.
No description
No description
No description
Details
__construct(Runtime $runtime)
No description
void
addTag(string $key, string $value)
Adds a tag built from the given key and value.
protected array
flushTags()
Resets the assigned tags, returning the previously set tags.
array
enter(array $configuration, string $fusionPath)
Enter an evaluation
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.
array
preEvaluate(array $evaluateContext, object $fusionObject)
Check for cached evaluation and or collect metadata for evaluation
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).
mixed
postProcess(array $evaluateContext, object $fusionObject, mixed $output)
Post process output for caching information
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.
void
leave(array $evaluateContext)
Leave the evaluation of a path
Has to be called in the same function calling enter() for every return path.
mixed
evaluateUncached(string $path, array $contextArray)
Evaluate a Fusion path with a given context without content caching
This is used to render uncached segments "out of band" in getCachedSegment of ContentCache.
protected array
buildCacheIdentifierValues(array $configuration, string $fusionPath, object $fusionObject)
Builds an array of additional key / values which must go into the calculation of the cache entry identifier for a cached content segment.
protected array
buildCacheTags(array $configuration, string $fusionPath, object $fusionObject)
Builds an array of string which must be used as tags for the cache entry identifier of a specific cached content segment.
array
unserializeContext(array $contextArray)
No description
void
setEnableContentCache(bool $enableContentCache)
No description
bool
getEnableContentCache()
No description