createBuildCache
createBuildCache():
BuildCache
Defined in: packages/core/src/kernel/layer.ts:199
Create an in-memory BuildCache.
Returns
Section titled “Returns”A fresh, empty BuildCache.
Remarks
Section titled “Remarks”Backed by a plain Map. State lives for the lifetime of the returned
object — there is no persistence. Pass a single instance across
successive builder operations to benefit from .run() skipping.
Example
Section titled “Example”import { createBuildCache, computeBuildCacheKey } from '@fishnet/core'
const cache = createBuildCache()const key = await computeBuildCacheKey(undefined, 'echo hello')cache.set(key, 'layer-abc')cache.has(key) // true