class CacheClearCommand extends AbstractCommand
Properties
| protected InputInterface | $input | from AbstractCommand |
|
|
| protected OutputInterface | $output | from AbstractCommand |
|
|
| protected int | $isolatedExitCode | from AbstractCommand |
|
Methods
No description
Empty the caches and rebuild what can be rebuilt here, describing what happened.
Rebuild some compilers and record one entry per bundle.
No description
Details
at
line 33
__construct(Store $cache, Dispatcher $events, Paths $paths, Formatter $formatter, AssetManager $assets, LocaleManager $locales, SettingsRepositoryInterface $settings, VersionerInterface $versioner)
in AbstractCommand
at
line 36
protected void
configureIsolation()
in AbstractCommand
at
line 47
protected int
execute(InputInterface $input, OutputInterface $output)
in AbstractCommand
at
line 71
protected CommandMutex
commandIsolationMutex()
at
line 59
protected int
fire()
in AbstractCommand
at
line 78
protected bool
hasOption(string $name)
in AbstractCommand
at
line 83
protected void
info(string $message)
in AbstractCommand
at
line 88
protected void
comment(string $message)
in AbstractCommand
at
line 97
protected void
error(string $message)
Send an error or warning message to the user.
If possible, this will send the message via STDERR.
at
line 46
protected void
configure()
at
line 88
CacheClearReport|null
clear(bool $force = false, callable|null $listener = null)
Empty the caches and rebuild what can be rebuilt here, describing what happened.
Returns null when the cache store could not be emptied, which is the one failure that leaves nothing worth reporting. Everything after that point is best-effort: the caches are already gone, so a step that cannot be pre-built is recorded and the command still succeeds — the render path rebuilds lazily, exactly as it did before any of this was warmed. Public so the admin panel can clear the cache and show the same detail the console does. A listener is called with each step as it finishes, for a caller streaming them to a browser rather than waiting for the lot.
at
line 124
protected void
render(CacheClearReport $report)
at
line 168
protected string
describe(array $row)
at
line 179
protected void
warmAssets(CacheClearReport $report, bool $force)
at
line 227
protected void
record(CacheClearReport $report, string $frontend, string|null $locale, string|null $localeName, array $compilers, Cloud $assetsDir, bool $force)
Rebuild some compilers and record one entry per bundle.
Per bundle rather than per step: a locale compiles both a js and a css bundle, and describing them as one thing hides which of them changed. The size is read only where a bundle was actually written. On remote storage that is a round trip, and a bundle whose revision did not move is byte-identical to the one reported the last time it changed.