Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete operation does not support options arg #30

Closed
fctb12 opened this issue Mar 17, 2022 · 2 comments
Closed

Delete operation does not support options arg #30

fctb12 opened this issue Mar 17, 2022 · 2 comments

Comments

@fctb12
Copy link
Contributor

fctb12 commented Mar 17, 2022

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
Copy link

simlu commented Aug 7, 2023

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!

@Mar-Pfa
Copy link
Collaborator

Mar-Pfa commented Aug 7, 2023

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 :-)

@Mar-Pfa Mar-Pfa closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants