Skip to content

perf(pages): cache /projects and /testimonials - #73

Merged
ZeeshanAdilButt merged 2 commits into
mainfrom
perf/cache-projects-testimonials
Oct 28, 2026
Merged

ZeeshanAdilButt merged 2 commits into
mainfrom
perf/cache-projects-testimonials

Conversation

@ZeeshanAdilButt

Copy link
Copy Markdown
Member

/projects and /testimonials were force-dynamic: a database query on every visit, about 4s on a cold start and about 1s warm.

  • Both pages now use revalidate = 300: served from cache, rebuilt at most every five minutes
  • Admin creates, edits and deletes of projects, testimonials and impact stories call revalidatePath, so approvals show up on the next visit instead of waiting for the five minutes

The production build lists both routes as static with a 300s revalidate.

Admin creates, edits and deletes of projects, testimonials and impact
stories now call revalidatePath for /projects or /testimonials, so a
cached page picks up the change on the next visit.
Both pages ran a database query on every visit and took about four
seconds on a cold start. They are now prerendered and rebuilt at most
every five minutes, so visitors get a cached page.
@ZeeshanAdilButt
ZeeshanAdilButt merged commit c7ae369 into main Oct 28, 2026
2 checks passed
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.

1 participant