BJS-kr / nestjs-omacache

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

Bust all cache with params #1

Closed mandarvl closed 8 months ago

mandarvl commented 8 months ago

I'm caching some data with params like this :

@InMemoryCache({
        key: 'inventories',
        kind: 'temporal',
        ttl: 60 * 30,
        paramIndex: [0, 1]
 })
getInventories(p1:  string, p2: number) {
 // return inventories based on params
}

Now when updating inventories, How can I bust all cached data with the key inventories ? For example:

@InMemoryCache({
        key: 'inventories',
        kind: 'bust',
       allParams: true
 })
BJS-kr commented 8 months ago

I'll work on it. Thanks for the suggestion

mandarvl commented 8 months ago

Thank you, great package by the way!

BJS-kr commented 8 months ago

This task was assigned to member today. Feature will be added next monday. Thanks for waiting!

mandarvl commented 8 months ago

This task was assigned to member today. Feature will be added next monday. Thanks for waiting!

Glad to hear that

BJS-kr commented 8 months ago

feature added! thanks for your patience. closing issue