Watch: Add caching so repeat visits load instantly | Vovy

Watch Vovy do it on a Mac: "Add caching to my app so it stops hitting the database every time". Vovy finds the pages and API calls that return the same data over and over, then caches them at the edge or in Redis so they come back in milliseconds.

"Add caching to my app so it stops hitting the database every time"

Vovy finds the pages and API calls that return the same data over and over, then caches them at the edge or in Redis so they come back in milliseconds.

What happens in the video

  1. Find what repeats: Vovy looks at your routes and logs for data that is the same for everyone, like a pricing page, product list or public profile.
  2. Check current cache headers: In Chrome's Network tab it reads Cache-Control and x-vercel-cache on each response. MISS every time means nothing is being cached.
  3. Cache public pages at the edge: Cursor adds headers like s-maxage=60, stale-while-revalidate so Vercel's CDN serves a saved copy and refreshes it quietly in the background.
  4. Cache expensive queries in Redis: For data that needs a login, Vovy sets up an Upstash Redis database, a fast key-value store, and caches the slow query for a few minutes.
  5. Show the speed difference: You get a card with response times on first and second load, and the headers now showing HIT.
Read the step-by-step guide