diff --git a/lib/main.ts b/lib/main.ts index 7b225de..3e76e68 100644 --- a/lib/main.ts +++ b/lib/main.ts @@ -158,7 +158,9 @@ export class SugarCache { this.logger.debug(`[SugarCache:${this.namespace}] Deletion candidate keys - ${deletionCandidateKeys}`); if (!deletionCandidateKeys.length) return; - await this.redis.del(...deletionCandidateKeys); + await Promise.all(deletionCandidateKeys.map(k => this.redis.del(k))); + + this.logger.debug(`[SugarCache:${this.namespace}] Deletion keys removed`); } // ----------- Decorator Methods -----------