CacheFlushPlan

final class \TYPO3\CMS\Core\Cache\Flush\CacheFlushPlan

The resolved outcome of a CacheFlushDemand: the cache tags per cache group ("pages" unless stated, "all" for all caches) and the cache groups that will be flushed, and the records and cache commands they were resolved from.

Table of Contents

Properties

$context  : CacheFlushingContext

Methods

__construct()  : mixed
addCommand()  : bool
addError()  : void
An error reported while flushing, for example by a listener of CacheFlushEvent.
addGroup()  : void
Adds a cache group regardless of the permissions of the context.
addRecord()  : void
addTag()  : void
getCommands()  : array<int, string>
getErrors()  : array<int, string>
getGroups()  : array<int, string>
getRecords()  : array<int, CacheFlushRecord>
getSkippedGroups()  : array<string, CacheFlushSkipReason>
getTags()  : array<int, string>
getTagsByGroup()  : array<string, array<int, string>>
hasGroup()  : bool
hasRecordOfTable()  : bool
True if a record of the table was part of the demand, even if it was skipped.
hasTag()  : bool
removeGroup()  : void
removeTag()  : void
skipGroup()  : void

Properties

Methods

addCommand()

public addCommand(string $command) : bool

Parameters

$command : string

Return values

bool —

false if the command was already part of the plan

addError()

An error reported while flushing, for example by a listener of CacheFlushEvent.

public addError(string $error) : void

Parameters

$error : string

addGroup()

Adds a cache group regardless of the permissions of the context.

public addGroup(string $group) : void

"all" flushes all caches.

Parameters

$group : string

addTag()

public addTag(string $tag[, string $group = 'pages' ]) : void

Parameters

$tag : string
$group : string = 'pages'

getCommands()

public getCommands() : array<int, string>

Return values

array<int, string>

getErrors()

public getErrors() : array<int, string>

Return values

array<int, string>

getGroups()

public getGroups() : array<int, string>

Return values

array<int, string>

getTags()

public getTags([string $group = 'pages' ]) : array<int, string>

Parameters

$group : string = 'pages'

Return values

array<int, string>

getTagsByGroup()

public getTagsByGroup() : array<string, array<int, string>>

Return values

array<string, array<int, string>> —

cache group => tags

hasGroup()

public hasGroup(string $group) : bool

Parameters

$group : string

Return values

bool

hasRecordOfTable()

True if a record of the table was part of the demand, even if it was skipped.

public hasRecordOfTable(string $table) : bool

Parameters

$table : string

Return values

bool

hasTag()

public hasTag(string $tag[, string $group = 'pages' ]) : bool

Parameters

$tag : string
$group : string = 'pages'

Return values

bool

removeGroup()

public removeGroup(string $group) : void

Parameters

$group : string

removeTag()

public removeTag(string $tag[, string $group = 'pages' ]) : void

Parameters

$tag : string
$group : string = 'pages'
On this page