CacheFlushPlan
final class \
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
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
$context read-only
public
CacheFlushingContext
$context
Methods
__construct()
public
__construct(CacheFlushingContext $context) : mixed
Parameters
- $context : CacheFlushingContext
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
addRecord()
public
addRecord(CacheFlushRecord $record) : void
Parameters
- $record : CacheFlushRecord
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>getRecords()
public
getRecords() : array<int, CacheFlushRecord>
Return values
array<int, CacheFlushRecord>getSkippedGroups()
public
getSkippedGroups() : array<string, CacheFlushSkipReason>
Return values
array<string, CacheFlushSkipReason>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
boolhasRecordOfTable()
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
boolhasTag()
public
hasTag(string $tag[, string $group = 'pages' ]) : bool
Parameters
- $tag : string
- $group : string = 'pages'
Return values
boolremoveGroup()
public
removeGroup(string $group) : void
Parameters
- $group : string
removeTag()
public
removeTag(string $tag[, string $group = 'pages' ]) : void
Parameters
- $tag : string
- $group : string = 'pages'
skipGroup()
public
skipGroup(string $group, CacheFlushSkipReason $reason) : void
Parameters
- $group : string
- $reason : CacheFlushSkipReason