- In-memory TTL cache (server/src/cache.ts) with a get/set/clear surface
that a Redis backend can replace later for multi-replica setups.
- Cache the expensive opportunities ranking (5 min), item detail/search
(1 h), and per-item market prices (10 min). All keyed by request; each
read endpoint takes a refresh/force bypass.
- Invalidate precisely on writes: price upserts, overrides, profile
activate/update, economy config, and game-data reparse (full clear).
- AODP anti-spam: a price download now skips items priced within a
configurable cooldown (default 15 min, Settings page) unless "force"
is checked; the job reports how many fresh items it skipped.
- No client-side caching (per request); the browser still calls the API,
but repeats are served from the server cache without recompute/AODP.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Extract world-parse + packet capture into @albion/shared (reused by
server and a new standalone agent workspace).
- Migrate the data layer from SQLite/better-sqlite3 to shared Postgres
(async pg with a ?->$n helper; economy engine preloads the item/recipe
graph so its sync recursion still works).
- API-key auth (ALBION_API_KEY) on all /api routes except health; web UI
sends it via a fetch wrapper + key-entry gate; server serves the built
UI with a path-traversal-safe static handler (drops @fastify/static).
- Windows companion agent: pushes world map + captured market orders to
/api/ingest/*; runs on the gaming PC where the game traffic lives.
- Docker + docker-compose (external proxy + backend networks for Nginx
Proxy Manager and shared Postgres) and a Forgejo deploy workflow.
- Validated end-to-end against Postgres 16 and a full compose run.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>