generated from OpsDeck/module_template
Persist badge catalog + icon cache via ctx.storage #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The myTeamSpeak badge catalog and icon cache (
backend/badges.ts,BadgeCatalog) are in-memory only. Every host restart refetches the protobuf catalog frombadges-content.teamspeak.com/listand re-downloads every icon variant on first use. That is external traffic and startup latency for data that changes rarely.Proposal
Once OpsDeck core ships module-scoped persistent storage (
ctx.storage, see below), use it here:byGuidentries) with a fetched-at timestamp; rehydrate onregister()and only refetch when stale or on the existing refresh cadence.MAX_ICON_BYTEScap; failures stay uncached as today.Blocked by
Blocked by OpsDeck/core#37 — the
ctx.storagecapability does not exist yet. This issue should not start until that lands and the SDK exposes it.