update cache when database gets updated
mxz7 opened this issue · comments
so i'm not sure if this is intended or not, but when fetching data the cache works fine, but when you then update that data, the cache still exists so when you fetch again, you get out of date data.
any chance this could be added? i thought it would be an expected feature
There is basic cache invalidation where all data related to a Model will be removed from the cache if the data related to that Model is updated. 🙂
Can you post your Prisma model, code, a minimum reproduction, anything? I would need to see what you are doing and why it isn't working.
quick script i made: https://pastebin.com/idnc2rmU
the output:
starting balance was 69420, gets updated to 6666666, but still stays as 69420 on second select