BJS-kr / nestjs-omacache

flexible, powerful and simple caching strategy using decorators for NestJS
72 stars 4 forks source link

bust multiple cache keys #3

Closed jsbyeon1 closed 6 months ago

jsbyeon1 commented 6 months ago

When a data changed, there should be multiple routes affected by the change

i.e.) When User info changed: User, MyPage, Profile routes should remove their cache immediately

it can improve control over cache much more easily

mandarvl commented 6 months ago

You can bust a specific key using this options:

{
  key: 'users',
  kind: 'bust'
}

The only problem is that it doesn't bust all childs cache (ie with params) but there's already a pull request for this feature