MCPcopy Create free account
hub / github.com/garrytan/gstack / BrainCacheEntity

Interface BrainCacheEntity

scripts/brain-cache-spec.ts:14–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 */
13
14export interface BrainCacheEntity {
15 /** Filename inside ~/.gstack/{,projects/<slug>/}brain-cache/ */
16 file: string;
17 /** Time-to-live in milliseconds before cache is considered stale and triggers cold refresh. */
18 ttl_ms: number;
19 /** Scope determines which dir holds the cache file. */
20 scope: 'cross-project' | 'per-project';
21 /**
22 * Which write-paths invalidate this digest. When a writer runs, it consults
23 * this list to know which cache files to bust. Special values:
24 * - 'calibration-write' — any Phase 2 takes_add call
25 * - 'skill-run-write' — any skill that writes a gstack/skill-run page
26 * Otherwise these are skill names like '/plan-ceo-review'.
27 */
28 invalidated_by: ReadonlyArray<string>;
29 /** Hard byte budget for the digest. Compressor drops oldest items if exceeded. */
30 budget_bytes: number;
31}
32
33/**
34 * The seven cached entities mirror the seven typed page kinds in

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected