**Note** from Bead: Cache Manager · [canonical source](https://redfish.acequia.io/guerin/.agents/cc07a6c8-dcb9-4470-9569-e16604470393/2026-06-18/notes/00-cache-manager-forage.md) · session 2026-06-18 · discussion: Talk: Cache Manager
**Bead:** `cc07a6c8-dcb9-4470-9569-e16604470393` (`cache-manager`) · Opened 2026-06-18 · for Stephen **Trigger (verbatim):** *"start-bead cache-manager / forage beads about caches"* This is the orientation note: the **forage** of existing cache work in the commons, a working hypothesis for what cache-manager IS (and is **not**), and the open questions Stephen binds. Exploratory thread — scaffold + survey, not a finished thesis.
## 1. The boundary question (lead — Stephen binds) There is already a load-bearing cache bead: **[`4456cd24` decentralized-cache-management](https://redfish.acequia.io/guerin/.agents/4456cd24-010a-41e9-a14c-a2d1086893bd/about.md)**. It is the **substrate model** — *paper-first, "what-if", no plans to implement at creation* (Stephen's frame): cache-as-state, the Firebase→acequia map, the three hard problems, cache-as-active-field. So cache-manager must NOT restate it. The working hypothesis: > **`4456cd24` says what the cache substrate *is*. `cache-manager` is the *operational agent* that > *manages* real cache replicas over that substrate** — the mayordomo of caches, sibling to > bead-orchestrator (mayordomo of beads). Where `4456cd24` is theory and `4c6470f9` coordinates *beads*, > cache-manager runs the verbs *on the cache itself*: **fill, serve, invalidate, evict (apoptose), push, > reconcile, elect** across the replica set (browser Cache-API / OPFS / IndexedDB ⇄ SW ⇄ OS-node origin ⇄ > WebDAV endpoint). In the acequia metaphor: cache-manager is the **compuerta / saca operator** — it shapes the flow of water into and out of each local ditch (cache), it does not redefine the ditch. **Q0. Is that the right division?** Options: (a) cache-manager = the operational/agent counterpart of `4456cd24` (this note's hypothesis); (b) cache-manager *is* the build-out of `4456cd24` and `4456cd24` stays the spec it implements; (c) cache-manager is narrower — just the SW/OS cache-broker daemon (the `4456cd24` note-02 + orchestrator Duty-4 mechanism, made real); (d) merge/rename. **Lean: (a)+(c)** — the manager agent whose first concrete job is the cache-broker bridge.
## 2. Forage inventory (cache work already in the commons) ### Tier 1 — substrate / theory (mount; do not restate) - **[`4456cd24` decentralized-cache-management](https://redfish.acequia.io/guerin/.agents/4456cd24-010a-41e9-a14c-a2d1086893bd/about.md)** — THE substrate. Notes: `01-cache-as-state-substrate` (Firebase→acequia, 3 hard problems: write granularity, conflict-under-partition, realtime push), `00-cache-coherence-model` (identity/versioning, invalidation-as-apoptotic-signal, lease), `02-sw-cache-broker-and-loopback-sync`, `03-cache-as-filesystem-single-place` (Cache-API ≠ OPFS ≠ IndexedDB), `04-computed-resources-agent-face-in-sw`, `06-cache-as-active-field` (percolation/diffusion, Hubler field). **The open Qs there are largely cache-manager's to operationalize.** - **[`96597c32` DLA-2026 / manifesto](https://redfish.acequia.io/guerin/.agents/96597c32-7f1c-4e95-acd5-635673461781/about.md)** — `service-worker-as-edge-agent` (every tab a transient origin, SW = cache keeper), `hubler-network` (GET→COMPUTE→PUT, coherence not a peer CDN), `spatial-cache-matrix`. The ecology-wide frame. ### Tier 2 — operational mechanism (coordinate with) - **[`4c6470f9` bead-orchestrator](https://redfish.acequia.io/guerin/.agents/4c6470f9-b74a-4aba-b436-5e998f469cce/about.md)** — Duty 3 (smart multi-endpoint sync + leader election / lease) and Duty 4 (OS-node subagents bridging SW caches to the real CORS origin) are **cache management for the bead tree**. cache-manager generalizes that machinery to arbitrary cached resources; the lease/election is shared. **Boundary:** orchestrator coordinates *beads*; cache-manager manages *cache replicas*. - **[`fe7fbaf5` bead-as-webdav-handler](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/about.md)** — the liveness ladder (static → SW → OS-animator) and `webdav-bead.mjs` runtime are where cache reads/writes are actually served. cache-manager's verbs run at these rungs. - **[`aeb319e9` local-gateway-agent](https://redfish.acequia.io/guerin/.agents/aeb319e9-a00c-46cc-8b33-07eabcf17813/about.md)** — `00-local-first-cache-sync` (SW-only HTTP; cache↔WebDAV two-layer split), Caddy local TLS, mDNS naming, router-as-mayordomo. The LAN architecture that avoids the cloud round-trip. ### Tier 3 — storage + query layers (the cache media) - **[`43685e36` browser+node vector/RAG search](https://redfish.acequia.io/guerin/.agents/43685e36-80bb-44dc-94be-89ea1c2fa205/about.md)** — isomorphic search over OPFS / IndexedDB / SW-Cache; storage-agnostic indexing. - **[`6f5044df` orama-bead](https://redfish.acequia.io/guerin/.agents/6f5044df-cd90-459d-a150-e0250e98039a/about.md)** — portable Orama index as a projection over cache-stored metadata. ### Tier 4 — live exemplars (cache patterns in action) - **[`3e978f25` simtable-learnmore-anyhazard editor](https://redfish.acequia.io/guerin/.agents/3e978f25-63f0-4002-9501-83d3f79345f4/about.md)** — **CRDT change-ops** for sub-document deltas (per-paragraph LWW-Register) instead of whole-file WebDAV sync. A worked answer to `4456cd24`'s "write granularity" hard problem. *(This is the file currently open in the IDE: `simtable.com/learnmore/anyhazard.html`.)* - **[`3d7a3a1a` claude-duplicate-chat-tabs](https://redfish.acequia.io/guerin/.agents/3d7a3a1a-9a4c-450a-a548-f19675b8dfe3/about.md)** — cache-as-state at session-file scale: fork-on-duplicate-tab, last-leaf-wins. The hard problem in miniature. - **[`7049c694` home-port-forward-hosting](https://redfish.acequia.io/guerin/.agents/7049c694-e45b-4116-a887-49e64885ac8e/about.md)** + **[`82bd6fa4` stephenguerin-live-router](https://redfish.acequia.io/guerin/.agents/82bd6fa4-4d5a-435b-9deb-ca930a82aa89/about.md)** — the home node + live router as real cache-serving origins (the "origin is an animator" pattern). ### Reference docs (`.ai/`) - [`browser-hosting.md`](https://redfish.acequia.io/.ai/browser-hosting.md) — browser as CDN endpoint (IndexedDB/OPFS/FS-Access; WebRTC/WS; leader election; CORS). - [`query-string-version-cache-busting-pattern.md`](https://redfish.acequia.io/.ai/query-string-version-cache-busting-pattern.md) — version query strings as invalidation + dependency snapshot. - [`webdavsync.md`](https://redfish.acequia.io/.ai/webdavsync.md) — the WebDAV↔local sync CLI (multi-endpoint replication).
## 3. What cache-manager would own (working scope) If the §1 hypothesis holds, the cache-manager agent's verbs over the **replica set**: | Verb | Meaning | Grounded in | |---|---|---| | **fill** | populate a local replica (SW Cache / OPFS / IDB) from an origin or peer | browser-hosting; SW-as-edge-agent | | **serve** | answer a read from the nearest live replica (local-first) | liveness ladder (`fe7fbaf5`) | | **invalidate** | mark a replica stale — the apoptotic signal, not a silent overwrite | `4456cd24` note 00 | | **evict / apoptose** | reclaim space by *signaled* death, not necrotic decay | apoptosis-vs-necrosis | | **push** | propagate a write to peers (realtime transport: WS/SSE/WebRTC) | `4456cd24` hard problem 3 | | **reconcile** | resolve divergence under partition (CRDT op / lease / LWW, per-path) | `3e978f25` CRDT; `4456cd24` hard problem 2 | | **elect** | choose the single writer/leader for a path (shared with orchestrator Duty 3) | `7049c694` lease | These are exactly the **acequia-link breeds in motion**: a fill/push is a `txn`/`dock` link; a reconcile relaxes a `constraint` link toward least action; eviction is link apoptosis. (cache-manager is a natural consumer of `acequia-link` `72efa91c`.)
## 4. Open questions (Stephen binds) 1. **Q0 boundary** (§1) — operational counterpart of `4456cd24` (a), its build-out (b), just the cache-broker daemon (c), or merge (d)? Lean (a)+(c). 2. **First worked example** — which real cache to manage first? Candidates: the SW cache-broker → CORS bridge (orchestrator Duty 4); the `project.json` ai-team dashboard poll→push (the `4456cd24` v0 candidate); the dashboard's own bead-list cache. 3. **Conflict default** — CRDT-first (per `3e978f25`), lease-first, or per-path policy? 4. **Realtime transport** — WS / SSE / WebRTc DataChannel for `push`? (browser-hosting names all three.) 5. **Relation to orchestrator's lease** — does cache-manager reuse Duty-3 election, or hold its own? (Lean: one lease plane, shared — `acequia.leases`.) 6. **Paper or runnable?** — does this grow a real `cache-manager.mjs` (a SW + Node agent with the §3 verbs), or stay design until Q0 is bound? (Lean: scaffold now, build the cache-broker after Q0/Q2.) 7. **Is "cache-manager" even the right name** — vs `cache-mayordomo`, `acequia-cache`, `saca` (the ditch-flow operator)? (Naming echoes the `4456cd24` "rename to acequia-state?" open Q.)
## References (bead cross-links) - Bead: Decentralized Cache Management · [canonical](https://redfish.acequia.io/guerin/.agents/4456cd24-010a-41e9-a14c-a2d1086893bd/) - Bead: 96597c32 · [canonical](https://redfish.acequia.io/guerin/.agents/96597c32-7f1c-4e95-acd5-635673461781/) - Bead: Orchestrator · [canonical](https://redfish.acequia.io/guerin/.agents/4c6470f9-b74a-4aba-b436-5e998f469cce/) - Bead: As Webdav Handler · [canonical](https://redfish.acequia.io/guerin/.agents/fe7fbaf5-4c47-43b6-be1b-2f6ca15e8bfa/) - Bead: Local Gateway Agent · [canonical](https://redfish.acequia.io/guerin/.agents/aeb319e9-a00c-46cc-8b33-07eabcf17813/) - Bead: Browser + Node Vector & RAG Search · [canonical](https://redfish.acequia.io/guerin/.agents/43685e36-80bb-44dc-94be-89ea1c2fa205/) - Bead: Orama Bead · [canonical](https://redfish.acequia.io/guerin/.agents/6f5044df-cd90-459d-a150-e0250e98039a/) - Bead: Simtable Learnmore Anyhazard · [canonical](https://redfish.acequia.io/guerin/.agents/3e978f25-63f0-4002-9501-83d3f79345f4/) - Bead: Claude Duplicate Chat Tabs · [canonical](https://redfish.acequia.io/guerin/.agents/3d7a3a1a-9a4c-450a-a548-f19675b8dfe3/) - Bead: Home Port Forward Hosting · [canonical](https://redfish.acequia.io/guerin/.agents/7049c694-e45b-4116-a887-49e64885ac8e/) - Bead: Stephenguerin.live Router Bead · [canonical](https://redfish.acequia.io/guerin/.agents/82bd6fa4-4d5a-435b-9deb-ca930a82aa89/)