BeforeRecordRelatedCachesAreFlushedEvent
final class \
Dispatched once for every changed record, after the pages, cache tags and cache commands related to it have been resolved from the page tree and Page TSconfig "TCEMAIN.clearCache_*" and "TCEMAIN.clearCacheCmd".
Page ids are flushed by their "pageId_
The event is also dispatched by CacheFlusher::resolve(), which flushes nothing. Listeners must only change what is flushed, follow-up work belongs into a listener of AfterCacheFlushedEvent.
Table of Contents
Properties
- $context : CacheFlushingContext
- $originalPageId : int
- $pageId : int
- $pageTsConfig : array
- $skipReason : CacheFlushSkipReason|null
- $table : string
- $uid : int
Methods
- __construct() : mixed
- addPageId() : void
- addTag() : void
- getCommands() : array<int, string>
- getPageIds() : array<int, int>
- getTags() : array<int, string>
- hasTag() : bool
- setCommands() : void
- setPageIds() : void
- setTags() : void
Properties
$context read-only
public
CacheFlushingContext
$context
$originalPageId read-only
public
int
$originalPageId
$pageId read-only
public
int
$pageId
$pageTsConfig read-only
public
array
$pageTsConfig
$skipReason read-only
public
CacheFlushSkipReason|null
$skipReason
$table read-only
public
string
$table
$uid read-only
public
int
$uid
Methods
__construct()
public
__construct(string $table, int $uid, int $pageId, int $originalPageId, array $pageTsConfig, CacheFlushSkipReason|null $skipReason, CacheFlushingContext $context, array<int, int> $pageIds, array<int, string> $tags, array<int, string> $commands) : mixed
Parameters
- $table : string
- $uid : int
- $pageId : int
-
The page the record is located on, for "pages" the default language page itself. 0 if skipped.
- $originalPageId : int
-
The page whose Page TSconfig applies, the former location of a moved or deleted record
- $pageTsConfig : array
-
Page TSconfig "TCEMAIN."
- $skipReason : CacheFlushSkipReason|null
- $context : CacheFlushingContext
- $pageIds : array<int, int>
- $tags : array<int, string>
- $commands : array<int, string>
addPageId()
public
addPageId(int $pageId) : void
Parameters
- $pageId : int
addTag()
public
addTag(string $tag) : void
Parameters
- $tag : string
getCommands()
public
getCommands() : array<int, string>
Return values
array<int, string>getPageIds()
public
getPageIds() : array<int, int>
Return values
array<int, int>getTags()
public
getTags() : array<int, string>
Return values
array<int, string>hasTag()
public
hasTag(string $tag) : bool
Parameters
- $tag : string
Return values
boolsetCommands()
public
setCommands(array<int, string> $commands) : void
Parameters
- $commands : array<int, string>
setPageIds()
public
setPageIds(array<int, int> $pageIds) : void
Parameters
- $pageIds : array<int, int>
setTags()
public
setTags(array<int, string> $tags) : void
Parameters
- $tags : array<int, string>