Skip to content

perf: rethink authenticated feed detail caching with role-based cache and client SWR - #225

Draft
aminamos wants to merge 1 commit into
MobilityData:mainfrom
aminamos:perf/48-authed-feed-detail-caching
Draft

aminamos wants to merge 1 commit into
MobilityData:mainfrom
aminamos:perf/48-authed-feed-detail-caching

Conversation

@aminamos

Copy link
Copy Markdown

Summary:

Resolves #48.
Replaces wasteful per-user server data cache (feed-complete-${userId}) with role-based caching (admin vs authenticated), adds client-side SWR caching hook (useFeedDetailCache), and documents architecture in docs/architecture/authenticated-feed-detail-caching.md.

Expected behavior:

Next.js server cache is no longer bloated by duplicate per-user feed data, while client retains instant SWR navigation.

Testing tips:

  1. Checkout perf/48-authed-feed-detail-caching.
  2. Run yarn test.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with yarn test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

@aminamos is attempting to deploy a commit to the MobilityData Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rethink feed detail caching for authenticated users

2 participants