-
-
Notifications
You must be signed in to change notification settings - Fork 192
feat: per-host caching #1974
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
feat: per-host caching #1974
Conversation
This caching mechanism is independent of the lychee cache file.
Cache misses must only be tracked internally. Previously cache misses were tracked twice.
mre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the mess. That means that we kept checking repeated URLs to the same hosts. On the plus side, with this being merged, we should see another performance bump for websites with many identical links. Only added a few very minor syntactic suggestions. Semantically, it's all good, so feel free to ignore. Great work!
Co-authored-by: Matthias Endler <[email protected]>
1d38d6b to
5d2cd31
Compare
This actually implements per-host caching.
Previously there were some structures and methods which made it look like it was implemented. But upon closer inspection I realised this was not the case.
In the process I've also tried to clarify the difference between persistent inter-process caching (lychee cache file) and this process internal per-host caching in some places. Note that the requests which are cached in this "new" way do not appear as "cached" in the progress output. (from lychee cache
[200] http://localhost:9000/ | OK (cached)vs per-host cached[200] http://localhost:9000/) I've considered doing that as well, but that would probably require quite an additional effort without really much UX improvement. The per-host statistics cache rate is accurate and does count the per-host cache hits as such.Closes #1815 and #1593