Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, we would perform time-based caching for data from the crates.io API in order to avoid unnecessary load on it. Unfortunately, this would sometimes lead to situations such as #629 where the cache is out-of-date and confusing errors are produced.
Since the last time we looked at this, the API guidance for the sparse HTTP index has been clarified, explicitly having "no rate limit". This allows us to simplify the caching code dramatically, caching only the data from the rate-limited crates.io API, and always checking the sparse HTTP index to see if new versions have been published.
The new caching system no longer needs expiry times, as it will be updated consistently whenever a new version is published to the crates.io index.
After this change, we will make more network requests than before when running cargo-vet to check the index.