Свойство | Тип | Описание | |
---|---|---|---|
$cache | |||
$parser | |||
$propertyMapper | |||
$randomCacheMarker | string | ||
$securityContext |
Метод | Описание | |
---|---|---|
__construct ( ) | ContentCache constructor | |
createCacheSegment ( string $content, string $typoScriptPath, array $cacheIdentifierValues, array $tags = [], integer $lifetime = null ) : string | Takes the given content and adds markers for later use as a cached content segment. | |
createDynamicCachedSegment ( string $content, string $typoScriptPath, array $contextVariables, array $cacheIdentifierValues, array $tags = [], integer $lifetime = null, string $cacheDiscriminator ) : string | Similar to createUncachedSegment() creates a content segment with markers added, but in contrast to that function this method is used for rendering a segment which will be evaluated at runtime but can still be cached. | |
createUncachedSegment ( string $content, string $typoScriptPath, array $contextVariables ) : string | Similar to createCacheSegment() creates a content segment with markers added, but in contrast to that function this method is used for rendering a segment which is not supposed to be cached. | |
flush ( ) : void | Flush all content cache entries | |
flushByTag ( string $tag ) : integer | Flush content cache entries by tag | |
getCachedSegment ( Closure $uncachedCommandCallback, string $typoScriptPath, array $cacheIdentifierValues, boolean $addCacheSegmentMarkersToPlaceholders = false ) : string | boolean | Tries to retrieve the specified content segment from the cache – further nested inline segments are retrieved as well and segments which were not cacheable are rendered. | |
processCacheSegments ( string $content, boolean $storeCacheEntries = true ) : string | Takes a string of content which includes cache segment markers, extracts the marked segments, writes those segments which can be cached to the actual cache and returns the cleaned up original content without markers. |
Метод | Описание | |
---|---|---|
getTypeForContextValue ( mixed $contextValue ) : string | TODO: Adapt to Flow change https://review.typo3.org/#/c/33138/ | |
renderContentCacheEntryIdentifier ( string $typoScriptPath, array $cacheIdentifierValues ) : string | Renders an identifier for a content cache entry | |
replaceCachePlaceholders ( string &$content, boolean $addCacheSegmentMarkersToPlaceholders ) : integer | boolean | Find cache placeholders in a cached segment and return the identifiers | |
replaceUncachedPlaceholders ( Closure $uncachedCommandCallback, string &$content ) : string | Replace segments which are marked as not-cacheable by their actual content by invoking the TypoScript Runtime. | |
sanitizeTag ( string $tag ) : string | Sanitizes the given tag for use with the cache framework | |
sanitizeTags ( array $tags ) : array | Sanitizes multiple tags with sanitizeTag() | |
serializeContext ( array $contextVariables ) : array | Generates an array of strings from the given array of context variables |
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. |
Результат | string | The original content, but with additional markers and a cache identifier added |
public createDynamicCachedSegment ( string $content, string $typoScriptPath, array $contextVariables, array $cacheIdentifierValues, array $tags = [], integer $lifetime = null, string $cacheDiscriminator ) : string | ||
$content | string | The content rendered by the TypoScript Runtime |
$typoScriptPath | string | The TypoScript path that rendered the content, for example "page |
$contextVariables | array | TypoScript context variables which are needed to correctly render the specified TypoScript object |
$cacheIdentifierValues | array | |
$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. |
$cacheDiscriminator | string | The evaluated cache discriminator value |
Результат | string | The original content, but with additional markers added |
public createUncachedSegment ( string $content, string $typoScriptPath, array $contextVariables ) : string | ||
$content | string | The content rendered by the TypoScript Runtime |
$typoScriptPath | string | The TypoScript path that rendered the content, for example "page |
$contextVariables | array | TypoScript context variables which are needed to correctly render the specified TypoScript object |
Результат | string | The original content, but with additional markers added |
public flushByTag ( string $tag ) : integer | ||
$tag | string | A tag value that was assigned to a cache entry in TypoScript, for example "Everything", "Node_[…]", "NodeType_[…]", "DescendantOf_[…]" whereas "…" is the node identifier or node type respectively |
Результат | integer | The number of cache entries which actually have been flushed |
public getCachedSegment ( Closure $uncachedCommandCallback, string $typoScriptPath, array $cacheIdentifierValues, boolean $addCacheSegmentMarkersToPlaceholders = false ) : string | boolean | ||
$uncachedCommandCallback | Closure | A callback to process commands in uncached segments |
$typoScriptPath | string | TypoScript path identifying the TypoScript object to retrieve from the content cache |
$cacheIdentifierValues | array | Further values which play into the cache identifier hash, must be the same as the ones specified while the cache entry was written |
$addCacheSegmentMarkersToPlaceholders | boolean | If cache segment markers should be added – this makes sense if the cached segment is about to be included in a not-yet-cached segment |
Результат | string | boolean | The segment with replaced cache placeholders, or FALSE if a segment was missing in the cache |
protected getTypeForContextValue ( mixed $contextValue ) : string | ||
$contextValue | mixed | |
Результат | string |
protected replaceUncachedPlaceholders ( Closure $uncachedCommandCallback, string &$content ) : string | ||
$uncachedCommandCallback | Closure | |
$content | string | The content potentially containing not cacheable segments marked by the respective tokens |
Результат | string | The original content, but with uncached segments replaced by the actual content |
protected sanitizeTag ( string $tag ) : string | ||
$tag | string | A tag which possibly contains non-allowed characters, for example "NodeType_Neos.NodeTypes:Page" |
Результат | string | A cleaned up tag, for example "NodeType_TYPO3_Neos-Page" |
protected sanitizeTags ( array $tags ) : array | ||
$tags | array | Multiple tags |
Результат | array | The sanitized tags |
protected serializeContext ( array $contextVariables ) : array | ||
$contextVariables | array | |
Результат | array |
protected StringFrontend,Neos\Cache\Frontend $cache | ||
Результат |
protected CacheSegmentParser,Neos\Fusion\Core\Cache $parser | ||
Результат |
protected PropertyMapper,Neos\Flow\Property $propertyMapper | ||
Результат |