Class: FilesystemCache¶
WHERE — store/retrieve installed deps.
v1.0: fully async. All four methods may do filesystem / network IO (FilesystemCache uses fs/promises; Redis/HTTP caches are inherently async). Hot path concerns about prompt-building are addressed by caching results in-memory at higher layers, not by sync IO.
Implements¶
Constructors¶
Constructor¶
Parameters¶
| Parameter | Type |
|---|---|
baseDir |
string |
Returns¶
FilesystemCache
Properties¶
baseDir¶
Methods¶
has()¶
Parameters¶
| Parameter | Type |
|---|---|
scope |
string |
key |
string |
Returns¶
Promise\<boolean>
Implementation of¶
loadAll()¶
Parameters¶
| Parameter | Type |
|---|---|
scope |
string |
readers? |
ReaderPort[] |
Returns¶
Promise\<Record\<string, unknown>[]>
Implementation of¶
loadKey()¶
Parameters¶
| Parameter | Type |
|---|---|
scope |
string |
key |
string |
readers? |
ReaderPort[] |
Returns¶
Promise\<Record\<string, unknown>[]>
Implementation of¶
store()¶
Parameters¶
| Parameter | Type |
|---|---|
scope |
string |
key |
string |
items |
CacheItem[] |
Returns¶
Promise\<void>