Summary
Add a small query cache/SWR layer for repeated page data fetches.
Evidence
- Pages manage fetch state locally:
apps/web/src/components/OpportunitiesPage.tsx:57, apps/web/src/components/BargainsPage.tsx:27, apps/web/src/components/ListingsPage.tsx:32, and apps/web/src/components/ItemPage.tsx:27.
- Backend cache cadence is usually 15 minutes.
Expected Impact
Medium. Improves back/forward navigation and reduces duplicate network requests.
Implementation Notes
Use a lightweight custom cache or a library. Set stale time to match backend refresh for cache-backed endpoints.
Acceptance Criteria
- Route revisits can show cached data immediately.
- Stale data refreshes in the background where appropriate.
Summary
Add a small query cache/SWR layer for repeated page data fetches.
Evidence
apps/web/src/components/OpportunitiesPage.tsx:57,apps/web/src/components/BargainsPage.tsx:27,apps/web/src/components/ListingsPage.tsx:32, andapps/web/src/components/ItemPage.tsx:27.Expected Impact
Medium. Improves back/forward navigation and reduces duplicate network requests.
Implementation Notes
Use a lightweight custom cache or a library. Set stale time to match backend refresh for cache-backed endpoints.
Acceptance Criteria