sequelize-simple-cache icon indicating copy to clipboard operation
sequelize-simple-cache copied to clipboard

add cache Tag

Open alireza5014 opened this issue 4 years ago • 1 comments

there is a problem when we try to recache , it has not any tag so if i update my model it changes for everyone so other users need cache again you can add a specific id for cache Model . what do you say ? thank you. for example we user 1 and 2 .

user 1 updates his profile because it is not using specific tag for cache Model . it is doing the same for the user 2.

alireza5014 avatar Jan 05 '21 18:01 alireza5014

Well, sequelize-simple-cache is explicitly a simple cache. It's good for models/tables that are heavily read but rarely written such as system configuration data and alike. So, a write operation will invalidate the entire cache regarding that specific model/table. The current implementation doesn't allow to make this more flexible or more fine grained than on model/table-level. It is, well, just a simple cache for a very specific scenario. If you have specific ideas to improve, please let me know.

frankthelen avatar Jan 09 '21 19:01 frankthelen