hotelde/node-cache-manager-fs

Delete operation does not support options arg

fctb12 opened this issue · 2 comments

The delete operation does not support options arg, which results in incompatibility with several caching managers such as node-cache-manager. To fix this, the first few lines of the DiskStore delete operation need to be rewritten to the following.

DiskStore.prototype.del = function (key, options, cb) {

  if (typeof options === 'function') {
        cb = options;
        options = null;
  }
  cb = typeof cb === 'function' ? cb : noop;
simlu commented

Would be great to get this package updated as detailed in this issue!

It prevents us from updating node cache-manager, and we are stuck on an old version which is starting to cause us issues.

Cheers!

package contains the code code with the change from fctb12 - I published a new version on npm - this fixes the issue hopefully.
If the issue still exists feel free to develop a fix and create a pull request :-)