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 does not return a promise #79

Closed
nivthefox opened this issue Jan 18, 2017 · 4 comments
Closed

delete does not return a promise #79

nivthefox opened this issue Jan 18, 2017 · 4 comments

Comments

@nivthefox
Copy link

No description provided.

@BryanDonovan
Copy link
Contributor

In what situation are you seeing this?

@nivthefox
Copy link
Author

An in-memory datastore. So something like:

const CacheManager = require('cache-manager');
const cache = CacheManager.caching({store: 'memory'});

cache.set('foo', 1)
    .then(() => cache.get('foo'))
    .then((val) => console.log(val)) //1
    .then(() => cache.del('foo'))
    .then(() => cache.get('foo')) // throws an error. Expected a promise in return
    .then((val) => console.log(val)) // expect undefined

@BryanDonovan
Copy link
Contributor

Thanks. I added a test for this and it passes for me. I also tried your exact example and it didn't throw an error. Here's the commit with the test: 04e6333

Can you check out the latest master branch and see if the tests pass for you?

@nivthefox
Copy link
Author

Seems to work. Still doesn't work in my specific case, but I suppose I'll assume id10t error, at this point. Thanks!

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

2 participants