Class: CacheTask
Full name: Azera\Cli\Tasks\CacheTask
Clear or report framework caches.
Usage: cache:clear Clear all known caches cache:status Show cache file information
Managed caches:
- the bootstrap discovery cache (
vendor/azera-bootstrap.php); - the Clarity compiled template cache (
sys_get_temp_dir()/clarity); - the AOP proxy cache (
sys_get_temp_dir()/azera_aop, or whateverAppContext::setAopCacheDir()selected).
Compiled caches keep one file per template or proxied class and replace it in place.
They do not accumulate files, so cache:clear is only needed to reset an untrusted
cache.
AOP proxy headers let warm loads skip generation. Files are rewritten only when their
emitted body changes. Invalidating a file discards its shared OPcache op_array
(about 1.7 KB of wasted_shared_memory per invalidation in measurements), so the
stable path limits this cost to actual changes.
Options:
--only=
Examples: cache:clear cache:clear --only=bootstrap cache:clear --only=clarity --path=/tmp/my-cache cache:clear --only=aop cache:status
Public Properties
publicConsole$console·publicarray$options·
Public methods
clearAction() ·
public function clearAction(): void
Clear the selected caches.
Return value
- Type:
void
statusAction() ·
public function statusAction(): void
Report existing cache files.
Return value
- Type:
void