Repository navigation
Internals Vfs Cache Cache
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/vfs/cache/Cache.php · Snapshot 8411f4287706.
VFS includes package resource lookup, database-backed file metadata, filesystem collaborators, transient pools and persistent PHP-array caches.
class CacheDeclarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.
| Member | Declaration | Purpose or source contract |
|---|---|---|
| $pools | private static array $pools = []; |
Used by pool(). |
| Method | Signature |
|---|---|
| pool | public static function pool(string $name): CachePool |
| get | public static function get(string $pool, string $key): bool|array |
| set | public static function set(string $pool, string $key, array $data): CacheEntry |
| delete | public static function delete(string $pool, string $key): bool |
public static function pool(string $name): CachePool| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$name |
string $name |
Named key/label selected by this API; its exact scope is shown by the implementation trace. |
Return expressions (including local callbacks): self::$pools[$name].
Implementation, validation guards and interaction order
public static function pool(string $name): CachePool
{
if (!isset(self::$pools[$name])) {
self::$pools[$name] = new CachePool($name);
}
return self::$pools[$name];
}public static function get(string $pool, string $key): bool|array| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$pool |
string $pool |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$key |
string $key |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Return expressions (including local callbacks): self::pool($pool)->getCache($key).
Implementation, validation guards and interaction order
public static function get(string $pool, string $key): bool|array
{
return self::pool($pool)->getCache($key);
}public static function set(string $pool, string $key, array $data): CacheEntry| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$pool |
string $pool |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$key |
string $key |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$data |
array $data |
Input data array or payload; see allowed fields and validation guards below. |
Return expressions (including local callbacks): self::pool($pool)->setCache($key, $data).
Implementation, validation guards and interaction order
public static function set(string $pool, string $key, array $data): CacheEntry
{
return self::pool($pool)->setCache($key, $data);
}public static function delete(string $pool, string $key): bool| Parameter | Type, modifiers and default | Purpose |
|---|---|---|
$pool |
string $pool |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
$key |
string $key |
Operation input; the exact use, validation and propagation are shown in the implementation trace. |
Return expressions (including local callbacks): self::pool($pool)->deleteCache($key).
Implementation, validation guards and interaction order
public static function delete(string $pool, string $key): bool
{
return self::pool($pool)->deleteCache($key);
}AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes