Skip to content

Blog refresh: query caching post reframed to Prisma Postgres built-in caching#8051

Open
vanrensbird wants to merge 1 commit into
mainfrom
blog/refresh-caching
Open

Blog refresh: query caching post reframed to Prisma Postgres built-in caching#8051
vanrensbird wants to merge 1 commit into
mainfrom
blog/refresh-caching

Conversation

@vanrensbird

@vanrensbird vanrensbird commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Reframes the 2024 Accelerate caching post to Prisma Postgres's built-in TTL/SWR caching (verified included in Prisma Postgres). Same per-query cacheStrategy API; Accelerate marketing CTAs, speed-test link, and Prisma Optimize link removed; client-extension enablement step stated; egress-free note corrected. FAQ accordions, answer-first lead.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated a blog post to reflect Prisma Postgres query-level caching instead of Prisma Accelerate.
    • Refreshed the introduction, examples, and guidance around ttl and swr caching behavior.
    • Added clearer sections on when to use caching, which workloads benefit most, and when to avoid it.
    • Replaced older FAQ content with new answers about query caching and related usage questions.
    • Updated the conclusion and metadata to match the new topic and publication date.

… caching

Reviewed by Martin on localhost and passed Step 10 adversarial review.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vanrensbird vanrensbird requested a review from ankur-arch July 9, 2026 19:56
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Jul 9, 2026 7:59pm
docs Ready Ready Preview, Comment Jul 9, 2026 7:59pm
eclipse Ready Ready Preview, Comment Jul 9, 2026 7:59pm
site Ready Ready Preview, Comment Jul 9, 2026 7:59pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR rewrites a blog post's frontmatter and body content, retargeting it from Prisma Accelerate caching to Prisma Postgres per-query caching via cacheStrategy. Sections on TTL/SWR, when to cache, and savings are rewritten; a new FAQ section replaces prior Accelerate-specific content, and the closing note references Prisma Next.

Changes

Blog content update

Layer / File(s) Summary
Frontmatter and intro update
apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx
Frontmatter metadata, updatedAt timestamp, and intro are rewritten to reflect Prisma Postgres query caching with an update note explaining the Accelerate-to-Postgres shift.
Core caching guidance
apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx
Sections on why to cache, TTL/SWR behavior, when to cache, and savings are rewritten around cacheStrategy and Prisma Postgres.
FAQ and closing
apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx
New FAQ accordions cover Prisma Postgres caching questions, and the closing section references Prisma Next instead of Accelerate CTAs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • prisma/web#8018: Updates similar MDX content and wording around Prisma query caching, including a matching "Looking ahead: Prisma Next" note.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: refreshing the caching post to focus on Prisma Postgres built-in query caching.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx (1)

51-51: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor: tighten "at the moment" for conciseness.

Static analysis flags "at the moment the data expires" as wordy. A tighter phrasing improves readability without losing meaning.

✏️ Suggested rewording
- `swr` (stale-while-revalidate) serves the stale result for an additional window while the cache refreshes in the background, so users get fast responses even at the moment the data expires.
+ `swr` (stale-while-revalidate) serves the stale result for an additional window while the cache refreshes in the background, so users get fast responses even when the data expires.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx`
at line 51, Tighten the wording in the paragraph about ttl and swr by rephrasing
the sentence in the blog post content near the caching explanation, especially
the phrase “at the moment the data expires,” to a more concise equivalent while
keeping the meaning the same.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx`:
- Line 93: The Prisma Postgres provisioning command in the blog content is
outdated; update the sentence in the markdown so it tells readers to use the
current `npx create-db@latest` command instead of `npx create-db`. Keep the rest
of the guidance unchanged and make sure the command reference in the caching
article is consistent with the latest Prisma Postgres setup flow.

---

Nitpick comments:
In
`@apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx`:
- Line 51: Tighten the wording in the paragraph about ttl and swr by rephrasing
the sentence in the blog post content near the caching explanation, especially
the phrase “at the moment the data expires,” to a more concise equivalent while
keeping the meaning the same.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ab0f902f-e698-46da-964e-39d31c04c6ca

📥 Commits

Reviewing files that changed from the base of the PR and between 9459105 and 0ce71a3.

📒 Files selected for processing (1)
  • apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx

Caching remains one of the genuinely hard problems of software engineering. Caching more things won't solve problems by itself; a team needs to understand what can be cached and how it impacts their product.

While there are many different approaches to caching, Prisma Accelerate makes it easy to implement caching on a pre-query basis and gives you more time to focus on building great products. If you’d like to take the next step, [learn more about Accelerate](https://www.prisma.io/data-platform/accelerate?utm_source=website&utm_medium=blogpost&utm_campaign=caching) and [get started](https://www.prisma.io/docs/accelerate/getting-started) caching your Prisma ORM queries today.
With caching built into [Prisma Postgres](https://www.prisma.io/docs/postgres/database/caching) on a per-query basis, the implementation part stops being the hard part, and you can spend the time on the decisions instead. Create a database with `npx create-db`, add a `cacheStrategy` to your hottest query, and measure the difference.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search the repo for references to create-db to confirm the correct invocation.
rg -nP '\bcreate-db\b' --type=md --type=mdx -C2 || rg -nP 'create-db' -g '*.md' -g '*.mdx' -C2

Repository: prisma/web

Length of output: 176


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search tracked files for the command and related Prisma Postgres phrasing.
git ls-files | grep -E '\.(md|mdx|markdown|txt|yml|yaml|json)$' | xargs -r rg -n -C2 'create-db|Prisma Postgres|create a database|npx `@prisma`|`@prisma/create-db`|prisma create-db'

Repository: prisma/web

Length of output: 50369


🌐 Web query:

Prisma Postgres create database command npx create-db current command

💡 Result:

The command to provision a temporary Prisma Postgres database is npx create-db@latest [1][2]. This tool is a standalone CLI utility designed to quickly create managed PostgreSQL databases for testing or prototyping [2][3]. By default, databases created with this command are temporary and will be automatically deleted after 24 hours unless claimed using the URL provided in the terminal output [2][3]. Common Usage Commands: - Default creation: npx create-db@latest [2][4] - Interactive mode (to select a region): npx create-db@latest --interactive (or -i) [2][4] - Specify a region: npx create-db@latest --region (or -r) [2][4] - Alias commands: You can also use npx create-pg@latest or npx create-postgres@latest [4][3]. For configuration, you can use the --env flag to output the connection string directly, for example: npx create-db@latest --env >>.env [4]. Note that this is distinct from the prisma init --db command, which is used to initialize a new Prisma project configured with a managed Prisma Postgres database on the Prisma Data Platform [5].

Citations:


Use npx create-db@latest here. The current Prisma Postgres provisioning command includes @latest; npx create-db is stale and will mislead readers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/blog/content/blog/caching-database-queries-with-prisma-accelerate/index.mdx`
at line 93, The Prisma Postgres provisioning command in the blog content is
outdated; update the sentence in the markdown so it tells readers to use the
current `npx create-db@latest` command instead of `npx create-db`. Keep the rest
of the guidance unchanged and make sure the command reference in the caching
article is consistent with the latest Prisma Postgres setup flow.

@argos-ci

argos-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 9, 2026, 8:06 PM

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