CacheManager implements SingletonInterface

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$cacheConfigurations  : array<string|int, mixed>
$cacheGroups  : array<string|int, mixed>
Used to flush caches of a specific group is an associative array containing the group identifier as key and the identifier as an array within that group groups are set via the cache configurations of each cache.
$caches  : array<string|int, FrontendInterface>
$defaultCacheConfiguration  : array<string|int, mixed>
$disableCaching  : bool

Methods

__construct()  : mixed
flushCaches()  : void
Flushes all registered caches
flushCachesByTag()  : void
Flushes entries tagged by the specified tag of all registered caches.
flushCachesByTags()  : void
Flushes entries tagged by any of the specified tags in all registered caches.
flushCachesInGroup()  : void
Flushes all registered caches of a specific group
flushCachesInGroupByTag()  : void
Flushes entries tagged by the specified tag of all registered caches of a specific group.
flushCachesInGroupByTags()  : void
Flushes entries tagged by any of the specified tags in all registered caches of a specific group.
getCache()  : FrontendInterface
Returns the cache specified by $identifier
getCacheGroups()  : array<string|int, string>
handleCacheFlushEvent()  : void
hasCache()  : bool
Checks if the specified cache has been registered.
registerCache()  : void
Registers a cache so it can be retrieved at a later point.
setCacheConfigurations()  : void
Sets configurations for caches. The key of each entry specifies the cache identifier and the value is an array of configuration options.
createAllCaches()  : void
createCache()  : void
Instantiates the cache for $identifier.

Properties

$cacheConfigurations

protected array<string|int, mixed> $cacheConfigurations = []

$cacheGroups

Used to flush caches of a specific group is an associative array containing the group identifier as key and the identifier as an array within that group groups are set via the cache configurations of each cache.

protected array<string|int, mixed> $cacheGroups = []

$defaultCacheConfiguration

protected array<string|int, mixed> $defaultCacheConfiguration = ['frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class, 'backend' => \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class, 'options' => [], 'groups' => ['all']]

$disableCaching

protected bool $disableCaching = false

Methods

__construct()

public __construct([bool $disableCaching = false ]) : mixed
Parameters
$disableCaching : bool = false

flushCaches()

Flushes all registered caches

public flushCaches() : void

flushCachesByTag()

Flushes entries tagged by the specified tag of all registered caches.

public flushCachesByTag(string $tag) : void
Parameters
$tag : string

flushCachesByTags()

Flushes entries tagged by any of the specified tags in all registered caches.

public flushCachesByTags(array<string|int, mixed> $tags) : void
Parameters
$tags : array<string|int, mixed>

flushCachesInGroup()

Flushes all registered caches of a specific group

public flushCachesInGroup(string $groupIdentifier) : void
Parameters
$groupIdentifier : string
Tags
throws
NoSuchCacheGroupException

flushCachesInGroupByTag()

Flushes entries tagged by the specified tag of all registered caches of a specific group.

public flushCachesInGroupByTag(string $groupIdentifier, string $tag) : void
Parameters
$groupIdentifier : string
$tag : string
Tags
throws
NoSuchCacheGroupException

flushCachesInGroupByTags()

Flushes entries tagged by any of the specified tags in all registered caches of a specific group.

public flushCachesInGroupByTags(string $groupIdentifier, array<string|int, mixed> $tags) : void
Parameters
$groupIdentifier : string
$tags : array<string|int, mixed>
Tags
throws
NoSuchCacheGroupException

getCacheGroups()

public getCacheGroups() : array<string|int, string>
Internal
Return values
array<string|int, string>

hasCache()

Checks if the specified cache has been registered.

public hasCache(string $identifier) : bool
Parameters
$identifier : string
Return values
bool

registerCache()

Registers a cache so it can be retrieved at a later point.

public registerCache(FrontendInterface $cache[, array<string|int, mixed> $groups = [] ]) : void
Parameters
$cache : FrontendInterface
$groups : array<string|int, mixed> = []

Cache groups to be associated to the cache

Tags
throws
DuplicateIdentifierException

if a cache with the given identifier has already been registered.

setCacheConfigurations()

Sets configurations for caches. The key of each entry specifies the cache identifier and the value is an array of configuration options.

public setCacheConfigurations(array<string, array<string|int, mixed>> $cacheConfigurations) : void

Possible options are:

frontend backend backendOptions

If one of the options is not specified, the default value is assumed. Existing cache configurations are preserved.

Parameters
$cacheConfigurations : array<string, array<string|int, mixed>>

The cache configurations to set

Tags
throws
InvalidArgumentException

If $cacheConfigurations is not an array

createAllCaches()

protected createAllCaches() : void

        
On this page

Search results