Conversation
WalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ 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. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
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
📒 Files selected for processing (24)
apps/docs/content/docs/(index)/prisma-orm/add-to-existing-project/prisma-postgres.mdxapps/docs/content/docs/(index)/prisma-orm/quickstart/prisma-postgres.mdxapps/docs/content/docs/(index)/prisma-postgres/from-the-cli.mdxapps/docs/content/docs/(index)/prisma-postgres/quickstart/prisma-orm.mdxapps/docs/content/docs/accelerate/caching.mdxapps/docs/content/docs/accelerate/compare.mdxapps/docs/content/docs/accelerate/getting-started.mdxapps/docs/content/docs/accelerate/more/faq.mdxapps/docs/content/docs/accelerate/reference/api-reference.mdxapps/docs/content/docs/guides/authentication/clerk/astro.mdxapps/docs/content/docs/guides/authentication/clerk/nextjs.mdxapps/docs/content/docs/guides/deployment/cloudflare-workers.mdxapps/docs/content/docs/guides/frameworks/astro.mdxapps/docs/content/docs/guides/frameworks/elysia.mdxapps/docs/content/docs/guides/frameworks/hono.mdxapps/docs/content/docs/guides/frameworks/solid-start.mdxapps/docs/content/docs/guides/frameworks/sveltekit.mdxapps/docs/content/docs/guides/integrations/ai-sdk.mdxapps/docs/content/docs/guides/integrations/shopify.mdxapps/docs/content/docs/postgres/database/caching.mdxapps/docs/content/docs/postgres/database/local-development.mdxapps/docs/content/docs/postgres/database/meta.jsonapps/docs/content/docs/postgres/faq.mdxapps/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. |
There was a problem hiding this comment.
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.
| 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.
| "source": "/docs/postgres/database/caching", | ||
| "destination": "/docs/postgres", | ||
| "permanent": true |
There was a problem hiding this comment.
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.
| "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.
Summary by CodeRabbit