Effortless caching for PostgreSQL
Drop-in proxy that automatically caches your queries and keeps them fresh. No code changes required.
Built for teams shipping fast.
# Just change your connection string
DATABASE_URL=postgres://pgcache:5433/myapp
# Your queries are now cached automatically
SELECT * FROM users WHERE active = true # ~200ms → ~2msDatabase caching is hard
You shouldn't have to choose between fast and correct.
Manual cache invalidation
Sprinkling cache.delete() calls throughout your codebase leads to bugs, stale data, and maintenance nightmares.
Redis complexity
Running Redis means another system to monitor, scale, and secure. More infrastructure, more problems.
ORM limitations
Query caching built into ORMs rarely works well with complex queries, joins, or raw SQL.
Consistency tradeoffs
Most caching solutions force you to choose between performance and data freshness. Why not both?
Why PgCache?
Built for teams who need fast, reliable database performance without the complexity.
Zero Code Changes
Point your app at PgCache instead of Postgres. That's it. Your queries get cached automatically.
Always Fresh
Intelligent invalidation keeps your cache in sync with your database. No stale data headaches.
Fine-Grained Control
Configure TTLs, exclusion rules, and caching policies per query pattern when you need them.
Built-in Observability
See cache hit rates, query latencies, and invalidation events. Know exactly what's happening.
Wire-Compatible
Speaks native PostgreSQL protocol. Works with any language, ORM, or database tool you already use.
Production Ready
Battle-tested in production environments. Graceful degradation, connection pooling, and HA support.
How it works
Three steps to faster queries.
Deploy PgCache
Run PgCache alongside your application. Docker, Kubernetes, or bare metal—your choice.
docker run -d pgcache/pgcache \
--upstream postgres://db:5432/myappUpdate your connection string
Point your application at PgCache instead of Postgres directly.
# Before
DATABASE_URL=postgres://db:5432/myapp
# After
DATABASE_URL=postgres://pgcache:5433/myappEnjoy faster queries
PgCache automatically caches SELECT queries and invalidates them when underlying data changes.
# Your existing code works unchanged
users = db.query("SELECT * FROM users WHERE active = true")PgCache sits between your application and PostgreSQL, transparently caching queries.
Built for your team
Whether you're scaling up or optimizing costs, PgCache fits your workflow.
Reduce database load
Stop scaling your Postgres vertically for read-heavy workloads. PgCache absorbs repetitive queries without application changes.
Ship faster features
No more hand-rolling cache logic or debugging invalidation bugs. Focus on features, not infrastructure plumbing.
Lower infrastructure costs
Defer expensive database upgrades. PgCache can handle 10x the read traffic on the same hardware.
Improve reliability
Protect your database from traffic spikes. PgCache serves from cache when your primary is under pressure.
Ready to speed up your Postgres?
Join the waitlist for early access. Be the first to know when PgCache is ready.