From c918cba6540879a01b476cdd604e6c2328d9a483 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 14 Jul 2026 00:37:31 +0200 Subject: [PATCH] docs: note generalizing the MB cache table to a shared ApiCache The Last.fm browse page has the same live-external-call-per-load problem; name the cache table/helper generically (ApiCache) so Last.fm rides the same read-through, with a manual Refresh button and live own-state annotation. Co-Authored-By: Claude Opus 4.8 --- docs/superpowers/plans/2026-07-14-musicbrainz-cache.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/superpowers/plans/2026-07-14-musicbrainz-cache.md b/docs/superpowers/plans/2026-07-14-musicbrainz-cache.md index aa5d613..6fb129b 100644 --- a/docs/superpowers/plans/2026-07-14-musicbrainz-cache.md +++ b/docs/superpowers/plans/2026-07-14-musicbrainz-cache.md @@ -151,6 +151,12 @@ unthrottled). prefer real on-disk tracks; this MB cache covers the non-owned / fallback tracklist path. ## Notes / deferred +- **Name the table/helper generically** — the Last.fm browse page (`/lastfm`) has the same + problem (live external calls per load) and should ride the same read-through. Consider + `ApiCache(key, json, fetchedAt)` + `cached(...)` rather than MB-specific names, so Last.fm + keys (`lfm-top-artists:{user}:{period}:{page}`, etc.) share the table. See the Last.fm + caching todo. Only difference: Last.fm gets a manual **Refresh** button that busts its keys, + and own-state annotation stays live (cache only the raw Last.fm payload). - Redis deferred (see header). Reconsider only on measured PG-cache contention or a need for pub/sub / multi-instance. - `null`/negative caching gated on the Last.fm title-normalization todo landing first.