Skip to content
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

[FEAT]: Add caching #1

Open
wgnf opened this issue Nov 12, 2021 · 2 comments
Open

[FEAT]: Add caching #1

wgnf opened this issue Nov 12, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@wgnf
Copy link
Owner

wgnf commented Nov 12, 2021

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 wgnf added the enhancement New feature or request label Nov 12, 2021
@wgnf wgnf changed the title Add caching Add caching for licenses Nov 16, 2021
@wgnf wgnf changed the title Add caching for licenses Add caching for license information for Dependency Nov 16, 2021
@wgnf
Copy link
Owner Author

wgnf commented Jan 5, 2022

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)

@wgnf wgnf changed the title Add caching for license information for Dependency [FEAT]: Add caching Jan 6, 2022
@wgnf
Copy link
Owner Author

wgnf commented Nov 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant