-
Notifications
You must be signed in to change notification settings - Fork 31
Invalidating cache with update commands #29
Comments
I added I'm basically searching the Redis cache for all keys that matches a model when a Prisma
const keys = await redis.keys(`${model}:*`);
const deletedKeys = await redis.del(keys); So if |
I know most Prisma actions (queries and mutations) usually include an I don't know if this is true for all I'm curious what other people's opinion on this would be? |
It makes sense for me to call it a primary key for each model. Models are basically tables, right? If so, then there should only be one primary key per model. Disclaimer, I haven't used Prisma, I'm currently learning it. Referencing #62, I think it would be great to have this kind of API:
The docs could mention that if a |
|
If the database gets updated, the associated cache keys should be invalidated (either by updating or deleting).
The text was updated successfully, but these errors were encountered: