Member-only story
Speed up your database using query-level cache policies with Prisma Accelerate
One of the biggest problems we face when our product get a hit and our terrific increases is the high database query time and latency. You might think about vertical or horizontal scaling, which is an option but not necessary the most effective one.
Then you might think about caching, which is another option, caching is great when you need to reduce database or application load, so requests can use the cached data to avoid spending app or database time computing the result. This will aslo help with your database costs, as most cloud providers charge you based on the DB reads/write.
So caching is a good option here, however you must be careful about when and how you cache your data, for example, if your app uses some data that must be exactly up-to-date to function, your probably don’t want to cache those.
Here is where Prisma Accelerate can fit best, becaouse not only adding caching with Prisma Accelerate is as easy as adding a cacheStrategy
option to a query, but you can also find the right query to cache, plus caching queries with Prisma Accelerate is on a per-query basis, you are only charged for the queries you do cache.