-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Allow option to ignore failures in cache #1400
Comments
Yeah, good idea. |
Actually, reading this again, I think what you were asking for is slightly different: the cache should be stored even if we encounter 429 status codes. Is that correct? |
No, the cache should not be stored if we get a 429. |
Sorry, I think that's what I meant. So we don't cache the 429s; just the rest. This way on the next run when we load the cache again, we see all the 200s and can skip them. |
Yes, that is accurate. |
Here's the way I see it right now:
In summary, |
This introduces an option `--cache-exclude-status`, which allows specifying a range of HTTP status codes which will be ignored from the cache. Closes #1400.
This introduces an option `--cache-exclude-status`, which allows specifying a range of HTTP status codes which will be ignored from the cache. Closes #1400.
We're looking into caching our lychee results, as we're checking a lot of URLs, and we're frequently getting 429s from some services.
Unfortunately right now, lychee only skips caching for excluded, unsupported and unknown checks.
This means we can only store our cache if a run fully passed.
If there was an option such as
--ignore-cache-failures
, we would be able to store the cache every time, even when a run failed, but with only the success checks.Then, a subsequent run would only check the URLs that previously failed and reduce the amount of checks we need to run.
Before looking into adding that option, I wanted to raise this issue to ensure I didn't miss anything and there wasn't already an alternative, or a good reason for this not to exist.
The text was updated successfully, but these errors were encountered: