dabroek / node-cache-manager-ioredis

Redis store for node-cache-manager using IORedis.
MIT License
59 stars 29 forks source link

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

Open markoivanovski opened 2 years ago

markoivanovski commented 2 years ago

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 commented 2 years ago

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

Thanks!

ehaynes99 commented 2 years ago

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...

Tirke commented 2 years ago

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