node-cache-manager-ioredis icon indicating copy to clipboard operation
node-cache-manager-ioredis copied to clipboard

.del(key, options, cb) method not returning a Promise

Open markoivanovski opened this issue 3 years ago • 3 comments

https://github.com/dabroek/node-cache-manager-ioredis/blob/3bf4514e2e0c0b76126bb1997103b7555ff4b003/index.js#L69

The delete method does not appear to be wrapped in a Promise, giving it a different signature to the other methods. Believe it is supposed to?

self.del = (key, options, cb) => {
  if (typeof options === 'function') {
    cb = options;
  }

  redisCache.del(key, handleResponse(cb));
};

markoivanovski avatar Oct 08 '21 03:10 markoivanovski

@dabroek I have linked a PR that fixes the issue, do you think it could be merged and release?

Thanks!

markoivanovski avatar Oct 11 '21 09:10 markoivanovski

Was the PR just closed due to inactivity? This has been inconsistent with the cache-manager#Cache interface all along, and the fix simply follows the pattern of the others...

ehaynes99 avatar Apr 01 '22 20:04 ehaynes99

@markoivanovski Did a rewrite of this package with del returning a promise here: https://www.npmjs.com/package/@tirke/node-cache-manager-ioredis

Tirke avatar Aug 09 '22 07:08 Tirke