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

Add Caching #3

Open
ckoopmann opened this issue Apr 5, 2023 · 1 comment
Open

Add Caching #3

ckoopmann opened this issue Apr 5, 2023 · 1 comment

Comments

@ckoopmann
Copy link
Collaborator

Not sure if we even need this in the first place but I noticed that in eth-analysis-rs there is a caching logic, presumably to reduce the number of db requests and thereby enhance the performance.

@alextes Would love to hear if you have any thoughts on this. Priority / Necessity of caching as well as wether we can just more or less copy the caching approach of eth-analysis-rs or do it differently.

@alextes
Copy link
Member

alextes commented Apr 5, 2023

I don't think I'd copy the same. The eth-analysis-rs caching is quite sophisticated because it very specifically wants:

  • one cache writer which updates whenever new data is available, and so every 12s
  • many cache readers which get tipped off and update in unison as data becomes available

Depending on the desired feature by users, "request from the DB every time" plus a caching header cloudflare respects may be enough already.

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