/** The outcome of one guarded read, so the caller keeps owning its hit/miss accounting. */ export interface InvocationScopedLoadResult { value: T; /** Whether THIS caller ran the load, as opposed to joining one already in flight. */ loaded: boolean; } /** * Per-invocation coalescing of cache-miss loads, plus the local fence their publish needs. * * One instance per cache handle. `currentInvocation` returns an object identifying the * invocation being served, or `undefined` outside any bracketed entry point (a Workflows step, * which has no ExecutionContext). An absent invocation coalesces with NOTHING, because * two loads that cannot be told apart must be assumed to belong to different contexts. */ export declare class InvocationScopedLoads { private readonly currentInvocation; /** * In-flight loads, partitioned by invocation so a lookup can never return another * invocation's promise. Weak, so an invocation's partition is collected with it: an entry * point that ends mid-load leaks neither the map nor the promise. */ private readonly inFlight; /** Monotonic; every invalidation of this cache bumps it. See {@link loadAndPublish}. */ private invalidations; constructor(currentInvocation: () => object | undefined); /** * Record that this cache was invalidated, from any source: its own write path, or a * coherency probe applying a peer's. Breaks the fence for every load currently in flight. */ noteInvalidation(): void; /** * Run (or join, within this same invocation only) the load for one cache key, publishing the * result through `publish` when the fence holds. */ run(cacheKey: string, load: () => Promise, publish: (value: T) => Promise): Promise>; private loadAndPublish; } //# sourceMappingURL=invocationScopedLoads.d.ts.map