Summary
Product doc section 5.9 specifies Offline QR Mode — QR codes should work fully offline once generated. Implement a Redis-backed QR session cache in the backend so that the public profile data is served from cache, reducing DB load and supporting limited offline scenarios.
Context
The public profile route at apps/backend/src/routes/public.ts currently queries PostgreSQL on every request. Adding Redis caching here allows the profile resolution to serve from cache during poor connectivity scenarios at events.
Tasks
Acceptance Criteria
Difficulty
advanced — requires Redis integration, cache invalidation strategy, and token design for offline scenarios.
Summary
Product doc section 5.9 specifies Offline QR Mode — QR codes should work fully offline once generated. Implement a Redis-backed QR session cache in the backend so that the public profile data is served from cache, reducing DB load and supporting limited offline scenarios.
Context
The public profile route at
apps/backend/src/routes/public.tscurrently queries PostgreSQL on every request. Adding Redis caching here allows the profile resolution to serve from cache during poor connectivity scenarios at events.Tasks
apps/backend/src/plugins/).apps/backend/src/routes/public.ts, after a successful DB fetch:profile:<username>with a 5-minute TTL.X-Cache: HITheader.PUT /api/profiles/me), delete theprofile:<username>key.Cache-Control: public, max-age=300, stale-while-revalidate=60.GET /api/public/:username/qr-sessionendpoint that returns a pre-signed, short-lived (10 minute) token encoding the profile snapshot — intended for the native app to generate QR codes that don't depend on live connectivity.Acceptance Criteria
X-Cacheheader indicates HIT or MISS.Difficulty
advanced— requires Redis integration, cache invalidation strategy, and token design for offline scenarios.