sensslen / nuget-license

.NET Core tool to print or save all the licenses of a project
Apache License 2.0
26 stars 7 forks source link

Cache licenses #47

Open UTurista opened 3 months ago

UTurista commented 3 months ago

Problem

With projects that depend on many libraries we may hit the same license URL a lot of times.

In fact, with some combinations, we may hit the same URL so many times that we trigger 429 errors and we fail to download the actual license.

Proposed solution

Cache the URL->License response combo, then when another package attempts to download from the same source we simply use the cached file.

sensslen commented 3 months ago

@UTurista thanks for the suggestion. For now this feature is not planned. Actually the current code only downloads the source once per package. However feel free to work on an improvement that caches the licenses....