Prisma Accelerate

Prisma Accelerate is a global database cache with built-in connection pooling that helps improve database performance in Serverless and Edge applications

Prisma Accelerate is a managed connection pool and global cache for your database. It works with Prisma ORM and supports PostgreSQL, MySQL, MongoDB, and more.

Prisma ORM supports connection pooling and query caching through Accelerate — you don't need a separate pooler or caching layer. Accelerate is included with Prisma Postgres and also available as a standalone add-on for external databases.

Connection pooling. Accelerate manages a global connection pool across 15+ regions. This matters most in serverless and edge environments, where connection exhaustion is a real failure mode. Prisma ORM routes through the pool automatically once you swap in the Accelerate connection string.

Query caching. Add a cacheStrategy to any Prisma ORM query to cache results at the edge using TTL or stale-while-revalidate. Results are served from 300+ cache locations. No Redis, no Memcached, no separate service.

src/lib/posts.ts
const posts = await prisma.post.findMany({
  cacheStrategy: { ttl: 60, swr: 10 }, // serve from cache for 60s (TTL); after TTL expires, serve stale for up to 10s while revalidating in the background (SWR)
})

Supported databases

Accelerate works with the database you already have, whether it is publicly accessible, or via an IP allowlist.

  • PostgreSQL
  • MySQL
  • MariaDB
  • PlanetScale
  • CockroachDB
  • MongoDB

Getting started

  • Getting started - Learn how to get up and running with Prisma Accelerate
  • Local development - Learn how to use Prisma Accelerate in a development environment
  • Examples - Check out ready-to-run examples for Prisma Accelerate

On this page