Prisma Accelerate now supports on-demand cache invalidation, giving developers precise control over when cached query results are refreshed. Previously, cache expiry relied solely on TTL or SWR timers. The new feature uses tags attached to cache strategies, allowing targeted invalidation via `$accelerate.invalidate` when data changes — for example, when a new post is added or a post is upvoted. This keeps cached data accurate without unnecessary full cache clears, balancing performance with data freshness.

3m read timeFrom prisma.io
Post cover image
Table of contents
The Importance of cache invalidationHow to add Prisma Accelerate on-demand cache invalidation to your projectStart caching your queries
1 Impression