class CacheClearReport

What clearing the cache actually did.

Kept separate from how it is presented: the console renders it as a table, the API hands it to the admin panel as JSON. Each step records what happened rather than a sentence about it, so the words can come from the translations on whichever side is doing the rendering — a formatted string built here would be English for ever.

Constants

UNCHANGED

REBUILT

REWRITTEN

EMPTY

CHUNKS

Methods

__construct(callable|null $listener = null)

No description

void
cleared(string $name, int|null $files = null)

No description

void
rebuilt(string $frontend, string|null $locale, string|null $localeName, string $bundle, string $state, string|null $revision, string|null $previousRevision, int|null $bytes, float $seconds)

One compiled bundle.

void
rebuiltChunks(string $frontend, int $changed, float $seconds)

The split chunks of one frontend, which have a revision each rather than one between them, so only a count of what moved is meaningful.

void
failed(string $step, string $message)

A step that could not be pre-built. The cache is already cleared by the time any of them run, so these are reported rather than fatal.

array
getCleared()

No description

array
getRebuilt()

No description

array
getFailures()

No description

array
toArray()

No description

Details

__construct(callable|null $listener = null)

Parameters

callable|null $listener

void cleared(string $name, int|null $files = null)

Parameters

string $name
int|null $files

Return Value

void

void rebuilt(string $frontend, string|null $locale, string|null $localeName, string $bundle, string $state, string|null $revision, string|null $previousRevision, int|null $bytes, float $seconds)

One compiled bundle.

`$state` says what happened to it — see the constants above — so a renderer can decide whether a revision, a size or neither is worth showing without parsing anything.

Parameters

string $frontend
string|null $locale
string|null $localeName
string $bundle
string $state
string|null $revision
string|null $previousRevision
int|null $bytes
float $seconds

Return Value

void

void rebuiltChunks(string $frontend, int $changed, float $seconds)

The split chunks of one frontend, which have a revision each rather than one between them, so only a count of what moved is meaningful.

Parameters

string $frontend
int $changed
float $seconds

Return Value

void

void failed(string $step, string $message)

A step that could not be pre-built. The cache is already cleared by the time any of them run, so these are reported rather than fatal.

Parameters

string $step
string $message

Return Value

void

array getCleared()

Return Value

array

array getRebuilt()

Return Value

array

array getFailures()

Return Value

array

array toArray()

Return Value

array