wgnf / liz

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
MIT License
9 stars 0 forks source link

[FEAT]: Add caching #1

Open wgnf opened 2 years ago

wgnf commented 2 years ago

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

wgnf commented 2 years ago

Following types of caches should be added (for now):

wgnf commented 9 months ago

Other libraries that I've read about are EasyCaching and FastCache