abhiaiyer91 / prisma-lrucache-middleware

Prisma Middleware for caching results of prisma queries
26 stars 3 forks source link

Still current with Prisma? #9

Open pkellner opened 2 years ago

pkellner commented 2 years ago

Sorry for making this an issue but not sure where else to ask.

Does this work with the latest prisma? I can't tell if there is another or built in feature that does similar. This seems like it should be a core feature of Prisma. Thanks

Asjas commented 2 years ago

This library doesn't use the latest Prisma Queries such as findUnique or findFirst. It still caches old queries such as findOne which have been removed from Prisma. @pkellner

I created a redis-based version of this library that is updated for the latest Prisma version, if you wanted to try that 🙂

https://github.com/Asjas/prisma-redis-middleware

This seems like it should be a core feature of Prisma.

There are open issues in the Prisma GitHub repo for a core caching feature but the Prisma team isn't working on it at the moment. Caching is hard 🤣

https://github.com/prisma/prisma/issues/11777 https://github.com/prisma/prisma/issues/3165