NaifyView\Engine\RuntimeIncludeArtifactCache クラス
RuntimeIncludeArtifactCache — request-local dynamic include artifact cache
dynamic include は runtime で template 名が決まるため、同じ request 内で同じ include を 何度も踏むと artifact probe だけが重複しやすい。出力は cache せず、compiled artifact だけを RuntimeSession 内に小さく保持して、scope は実行ごとに渡し直す。
使用例
$key = $cache->createKey($template, $currentPath, $contract);
$entry = $cache->read($session, $key);
プロパティ
| 名前 | 型 | 説明 |
|---|---|---|
private
$limit
|
int |
メソッド
| メソッド | 説明 |
|---|---|
public
__construct(int $limit = 32): void
|
インスタンスを初期化する |
public
createKey(string $template, string $currentTemplatePath, array $contract): string
|
`createKey()` を実行する |
public
read(RuntimeSession $session, string $cacheKey): ?array
|
`read()` を実行する |
public
store(RuntimeSession $session, string $cacheKey, string $template, string $path, CompiledClassArtifact $artifact): void
|
`store()` を実行する |