Skip to content

Ppg cache updates#7579

Open
mhartington wants to merge 2 commits intomainfrom
ppg-cache-updates
Open

Ppg cache updates#7579
mhartington wants to merge 2 commits intomainfrom
ppg-cache-updates

Conversation

@mhartington
Copy link
Member

@mhartington mhartington commented Mar 3, 2026

Summary by CodeRabbit

  • Documentation
    • Consolidated caching documentation references across guides and quickstarts to point to Accelerate caching instead of Prisma Postgres caching.
    • Removed references to query caching from multiple framework guides and integration documentation.
    • Implemented permanent redirect for the deprecated Prisma Postgres caching documentation page.

@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Building Building Preview, Comment Mar 3, 2026 3:12am
docs Building Building Preview, Comment Mar 3, 2026 3:12am
eclipse Building Building Preview, Comment Mar 3, 2026 3:12am

Request Review

@mhartington mhartington requested a review from ankur-arch March 3, 2026 03:12
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

Walkthrough

This PR consolidates caching documentation by removing Prisma Postgres-specific caching content, redirecting references to Accelerate caching documentation, and updating internal links across the documentation suite. The postgres-specific caching page is deleted and replaced with a permanent redirect to Accelerate resources.

Changes

Cohort / File(s) Summary
Prisma Postgres tutorial cleanups
apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/prisma-postgres.mdx, apps/docs/content/docs/(index)/prisma-orm/quickstart/prisma-postgres.mdx, apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx, apps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdx
Removed "Cache your queries" links and caching references from Next Steps and More Info sections.
Framework and integration guide cleanups
apps/docs/content/docs/guides/authentication/clerk/*, apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx, apps/docs/content/docs/guides/frameworks/*, apps/docs/content/docs/guides/integrations/*
Removed bullet points suggesting "Enable query caching with Prisma Postgres" from Next Steps sections across authentication, deployment, framework, and integration guides.
Accelerate documentation consolidation
apps/docs/content/docs/accelerate/caching.mdx, apps/docs/content/docs/accelerate/compare.mdx, apps/docs/content/docs/accelerate/getting-started.mdx, apps/docs/content/docs/accelerate/more/faq.mdx, apps/docs/content/docs/accelerate/reference/api-reference.mdx
Updated caching documentation links from postgres-specific paths to /accelerate/caching; added cache strategy examples and clarified eviction behavior; restructured content to emphasize Accelerate-based caching.
Postgres documentation restructuring
apps/docs/content/docs/postgres/database/caching.mdx, apps/docs/content/docs/postgres/database/local-development.mdx, apps/docs/content/docs/postgres/database/meta.json, apps/docs/content/docs/postgres/faq.mdx
Removed entire postgres-specific caching documentation page (297 lines); removed "Caching is mocked locally" subsection; removed "caching" from database meta navigation; redirected FAQ caching references to Accelerate documentation.
Navigation and redirects
apps/docs/vercel.json
Added permanent redirect from /docs/postgres/database/caching to /docs/postgres to handle legacy links.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Ppg cache updates' is vague and provides minimal context about the actual changes made to the documentation. Consider a more descriptive title such as 'Move Prisma Postgres caching docs from /postgres to /accelerate' or 'Consolidate Prisma Postgres caching documentation to Accelerate section' to better communicate the scope of changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci
Copy link

argos-ci bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 1 removed Mar 3, 2026, 3:22 AM

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
apps/docs/content/docs/accelerate/more/faq.mdx (1)

187-187: Point API wording to the API reference link.

Since this sentence explicitly mentions the cache invalidate API, linking to the API anchor is more precise than the general caching page.

Suggested link target refinement
-The [cache invalidate API](/accelerate/caching) is essential when data consistency cannot wait for the cache’s standard expiration or revalidation. Key use cases include:
+The [cache invalidate API](/accelerate/reference/api-reference#accelerateinvalidate) is essential when data consistency cannot wait for the cache’s standard expiration or revalidation. Key use cases include:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/accelerate/more/faq.mdx` at line 187, Update the link
target for the phrase "cache invalidate API" so it points directly to the API
reference anchor instead of the general caching page; replace the existing link
URL (/accelerate/caching) used in the line containing "The [cache invalidate
API](/accelerate/caching) is essential…" with the specific API anchor (e.g.,
/accelerate/caching#invalidate-cache-api or the actual invalidate API anchor
used in the docs) while keeping the link text unchanged.
apps/docs/content/docs/accelerate/compare.mdx (1)

42-52: Use canonical SWR wording for consistency.

Consider changing “stale-while-revalidating” to “stale-while-revalidate (SWR)” to match terminology used elsewhere in docs.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/accelerate/compare.mdx` around lines 42 - 52, Replace
the phrase "stale-while-revalidating" with the canonical phrase
"stale-while-revalidate (SWR)" in the example and surrounding text to match docs
terminology; update the comment/description around the prisma.user.findMany
example and any occurrences describing the cacheStrategy (e.g.,
cacheStrategy.swr) so it reads "stale-while-revalidate (SWR)" and optionally add
the "(SWR)" acronym on first use for consistency with other docs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/docs/content/docs/accelerate/more/faq.mdx`:
- Line 117: Update the sentence about cache eviction to avoid implying eviction
only happens for infrequently accessed items: keep the TTL upper bound (one
year) but add that cached items may be evicted due to cache policies or capacity
constraints regardless of access frequency (so even frequently accessed items
can be removed); modify the "Time-to-live" / `ttl` sentence to explicitly state
both the max TTL and that eviction can occur for any item due to eviction
policies or resource limits to match the later statement.

In `@apps/docs/vercel.json`:
- Around line 5614-5616: Update the redirect entry whose "source" is
"/docs/postgres/database/caching" so the "destination" preserves the caching
context instead of landing on "/docs/postgres"; change the "destination" value
to the new caching page (for example "/docs/accelerate/caching" or the canonical
caching doc path) while keeping the redirect "permanent": true so old URLs map
directly to the relocated caching page.

---

Nitpick comments:
In `@apps/docs/content/docs/accelerate/compare.mdx`:
- Around line 42-52: Replace the phrase "stale-while-revalidating" with the
canonical phrase "stale-while-revalidate (SWR)" in the example and surrounding
text to match docs terminology; update the comment/description around the
prisma.user.findMany example and any occurrences describing the cacheStrategy
(e.g., cacheStrategy.swr) so it reads "stale-while-revalidate (SWR)" and
optionally add the "(SWR)" acronym on first use for consistency with other docs.

In `@apps/docs/content/docs/accelerate/more/faq.mdx`:
- Line 187: Update the link target for the phrase "cache invalidate API" so it
points directly to the API reference anchor instead of the general caching page;
replace the existing link URL (/accelerate/caching) used in the line containing
"The [cache invalidate API](/accelerate/caching) is essential…" with the
specific API anchor (e.g., /accelerate/caching#invalidate-cache-api or the
actual invalidate API anchor used in the docs) while keeping the link text
unchanged.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 23f1198 and 1372d8f.

📒 Files selected for processing (24)
  • apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/prisma-postgres.mdx
  • apps/docs/content/docs/(index)/prisma-orm/quickstart/prisma-postgres.mdx
  • apps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdx
  • apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx
  • apps/docs/content/docs/accelerate/caching.mdx
  • apps/docs/content/docs/accelerate/compare.mdx
  • apps/docs/content/docs/accelerate/getting-started.mdx
  • apps/docs/content/docs/accelerate/more/faq.mdx
  • apps/docs/content/docs/accelerate/reference/api-reference.mdx
  • apps/docs/content/docs/guides/authentication/clerk/astro.mdx
  • apps/docs/content/docs/guides/authentication/clerk/nextjs.mdx
  • apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx
  • apps/docs/content/docs/guides/frameworks/astro.mdx
  • apps/docs/content/docs/guides/frameworks/elysia.mdx
  • apps/docs/content/docs/guides/frameworks/hono.mdx
  • apps/docs/content/docs/guides/frameworks/solid-start.mdx
  • apps/docs/content/docs/guides/frameworks/sveltekit.mdx
  • apps/docs/content/docs/guides/integrations/ai-sdk.mdx
  • apps/docs/content/docs/guides/integrations/shopify.mdx
  • apps/docs/content/docs/postgres/database/caching.mdx
  • apps/docs/content/docs/postgres/database/local-development.mdx
  • apps/docs/content/docs/postgres/database/meta.json
  • apps/docs/content/docs/postgres/faq.mdx
  • apps/docs/vercel.json
💤 Files with no reviewable changes (17)
  • apps/docs/content/docs/guides/frameworks/elysia.mdx
  • apps/docs/content/docs/guides/frameworks/sveltekit.mdx
  • apps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdx
  • apps/docs/content/docs/guides/frameworks/hono.mdx
  • apps/docs/content/docs/accelerate/caching.mdx
  • apps/docs/content/docs/guides/frameworks/astro.mdx
  • apps/docs/content/docs/guides/deployment/cloudflare-workers.mdx
  • apps/docs/content/docs/guides/integrations/ai-sdk.mdx
  • apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/prisma-postgres.mdx
  • apps/docs/content/docs/postgres/database/local-development.mdx
  • apps/docs/content/docs/guides/frameworks/solid-start.mdx
  • apps/docs/content/docs/guides/authentication/clerk/astro.mdx
  • apps/docs/content/docs/guides/integrations/shopify.mdx
  • apps/docs/content/docs/guides/authentication/clerk/nextjs.mdx
  • apps/docs/content/docs/postgres/database/meta.json
  • apps/docs/content/docs/postgres/database/caching.mdx
  • apps/docs/content/docs/(index)/prisma-orm/quickstart/prisma-postgres.mdx

## What is the maximum allowed value for the `ttl` parameter when configuring `cacheStrategy`?

The [Time-to-live](/postgres/database/caching#time-to-live-ttl) (`ttl`) parameter can be set for up to a _year_. However, it's important to note that items within the cache may be evicted if they are not frequently accessed.
The [Time-to-live](/accelerate/caching) (`ttl`) parameter can be set for up to a _year_. However, it's important to note that items within the cache may be evicted if they are not frequently accessed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify eviction wording for consistency.

This sentence implies eviction is mainly tied to low access frequency, but Line 121 states even frequently accessed items can still be evicted. Tightening this wording will avoid mixed expectations.

Suggested text update
-The [Time-to-live](/accelerate/caching) (`ttl`) parameter can be set for up to a _year_. However, it's important to note that items within the cache may be evicted if they are not frequently accessed.
+The [Time-to-live](/accelerate/caching) (`ttl`) parameter can be set for up to a _year_. However, cache entries may still be evicted before `ttl` is reached, including in some cases for frequently accessed items.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The [Time-to-live](/accelerate/caching) (`ttl`) parameter can be set for up to a _year_. However, it's important to note that items within the cache may be evicted if they are not frequently accessed.
The [Time-to-live](/accelerate/caching) (`ttl`) parameter can be set for up to a _year_. However, cache entries may still be evicted before `ttl` is reached, including in some cases for frequently accessed items.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/accelerate/more/faq.mdx` at line 117, Update the
sentence about cache eviction to avoid implying eviction only happens for
infrequently accessed items: keep the TTL upper bound (one year) but add that
cached items may be evicted due to cache policies or capacity constraints
regardless of access frequency (so even frequently accessed items can be
removed); modify the "Time-to-live" / `ttl` sentence to explicitly state both
the max TTL and that eviction can occur for any item due to eviction policies or
resource limits to match the later statement.

Comment on lines +5614 to +5616
"source": "/docs/postgres/database/caching",
"destination": "/docs/postgres",
"permanent": true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Redirect destination should preserve caching intent.

At Line 5615, redirecting old caching URLs to /docs/postgres loses context. Given this PR moves caching docs to Accelerate, this should land on the caching page directly.

Proposed fix
     {
       "source": "/docs/postgres/database/caching",
-      "destination": "/docs/postgres",
+      "destination": "/docs/accelerate/caching",
       "permanent": true
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"source": "/docs/postgres/database/caching",
"destination": "/docs/postgres",
"permanent": true
"source": "/docs/postgres/database/caching",
"destination": "/docs/accelerate/caching",
"permanent": true
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/vercel.json` around lines 5614 - 5616, Update the redirect entry
whose "source" is "/docs/postgres/database/caching" so the "destination"
preserves the caching context instead of landing on "/docs/postgres"; change the
"destination" value to the new caching page (for example
"/docs/accelerate/caching" or the canonical caching doc path) while keeping the
redirect "permanent": true so old URLs map directly to the relocated caching
page.

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.

2 participants