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

How to disable cache? #39

Open
sesteva opened this issue Nov 14, 2019 · 1 comment
Open

How to disable cache? #39

sesteva opened this issue Nov 14, 2019 · 1 comment

Comments

@sesteva
Copy link

sesteva commented Nov 14, 2019

Thank you for sharing this module.
I'm writing tests for Datasource extending it and I've found the cache getting in the way.
I'm mocking knex using jest-mock-knex to return different responses.
The challenge is the query is the same, therefore the key in the cache is the same and the object is returned.
I've tried passing .cache(0) so as to prevent caching at all but this did not work.
Please advise. If there is a potential change in the module needed, I would be glad to collaborate with a PR.
Thanks

@cvburgess
Copy link
Owner

Yeah this would have to be added - please give it a go and open a PR!

One of the main benefits of this lib is caching so I have not invested any resouces into a cache-free scenario but it makes sense to me :)

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