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

Unable to prevent reading from the Cache #291

Open
JoeDevine opened this issue Dec 20, 2023 · 3 comments
Open

Unable to prevent reading from the Cache #291

JoeDevine opened this issue Dec 20, 2023 · 3 comments

Comments

@JoeDevine
Copy link

The current implementation will always check the cache regardless of what value is passed in for the ttl.

Currently in the file /src/HTTPCache.ts on line 78 there is no check of ttl before reading from the cache:

const entry = await this.keyValueCache.get(cacheKey);

The ask would be to provide a conditional check on this line to bypass the read from the cache if ttl=0 as it is currently impacting the reported miss rate when trying to only inspect the miss rate for queries/request where the cache is actively used.

@smyrick
Copy link
Member

smyrick commented May 8, 2024

Would it be better here instead of setting ttl=0 to instead have a config to disable the cache entirely so then we can just check that instead?

@lleadbet
Copy link

This appears to have been resolved in v6.3.0 with a skipCache option introduced in #332

@smyrick
Copy link
Member

smyrick commented Jun 14, 2024

@JoeDevine Feel free to close the issue

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