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 NOT FOUND for providers cache #133

Open
hannahhoward opened this issue Feb 18, 2025 · 0 comments
Open

Cache NOT FOUND for providers cache #133

hannahhoward opened this issue Feb 18, 2025 · 0 comments

Comments

@hannahhoward
Copy link
Member

What

After running for several days, out cache hit rate on the providers cache is around 0.3. This is likely cause people just ask our gateway for things all the time that we don't have. This ends up dropping our TTFB. (arguably for not the most important requests, but still)

Currently, we don't cache when there are NO PROVIDERS -- even though this is cachable information.
Not found caching can be a bit tricky, but since we control the write pipeline through this indexer, we can invalidate not founds right when they change.

Change

  • add the ability to cache not found to the providers cache
  • since we're using SMEMBERS, we'll need to have a way to indicate "nothing is there, but we've actually already queried" -- some kind of special "not found" member?
  • one write of a new, actual value to the cache, check if there is a single "not found" and remove it
  • check redis docs for anything that might speed this up
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