liz (ˈlɪz) is a tool to extract license-information from your project/solution aimed on a fast and correct process. Whether it's via a dotnet-CLI-Tool, Cake-Addin or Nuke-Addon
Sometimes licenses need to be gathered lots of times i.e. in scenarios like build pipelines.
Most of the time though, the versions don't change and the licenses don't need to be downloaded again.
So a cache would be nice, which has a key (which can be the Package + Version) and contains all the data we need (such as raw license text).
Maybe a second cache with the URL as the key would be nice too.
Maybe a Cache Version is needed, so that future version upgrades don't break anything (I.e. the next version adds a new property to the model, a cache item with a lower version than the current wouldn't have this property and so it wouldn't be valid)
Look at NCache what that library can do
The cache should be persisted to disk.
Add an option like --no-cache so that one can run the extraction without getting data from and writing data to the cache
Following types of caches should be added (for now):
[ ] license text from URL, before downloading (?) (TTL!, because the content of an URL can change without the URL changing)
[ ] complete license information "blob" for a package reference (name, version, target framework) (no TTL required, because content of a package reference can only change with a version change)
Sometimes licenses need to be gathered lots of times i.e. in scenarios like build pipelines.
Most of the time though, the versions don't change and the licenses don't need to be downloaded again.
So a cache would be nice, which has a key (which can be the Package + Version) and contains all the data we need (such as raw license text).
Maybe a second cache with the URL as the key would be nice too.
Maybe a Cache Version is needed, so that future version upgrades don't break anything (I.e. the next version adds a new property to the model, a cache item with a lower version than the current wouldn't have this property and so it wouldn't be valid)
Look at NCache what that library can do
The cache should be persisted to disk.
Add an option like
--no-cache
so that one can run the extraction without getting data from and writing data to the cache