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

Cache performs two gets on misses #228

Open
akursar opened this issue Jul 22, 2020 · 0 comments
Open

Cache performs two gets on misses #228

akursar opened this issue Jul 22, 2020 · 0 comments

Comments

@akursar
Copy link

akursar commented Jul 22, 2020

We observe two cache.get() calls whenever we miss. The first attempt is made in CacheController.cached_request(). We see the "No cache entry available" in logs. However, we immediately see another cache.get() call after this. This seems to be because CacheController.conditional_headers() makes another call to self.cache.get().
This doesn't appear to be ideal, but I'm not sure what change to propose. I see some other usage of self.cache.get in the Controller as well. Since we don't rely on etag/last-modified headers, we may just use a custom Controller that has a condition_headers that simply returns {}, but raising here to see if there's any shared appreciation for trying to limit the number of get calls to make to the cache, or ideas for how otherwise to improve that.

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

1 participant