-
Notifications
You must be signed in to change notification settings - Fork 36
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
Addresses issue 193 #205
Addresses issue 193 #205
Conversation
…heckIntervalSecs for even better control over the cache
…Store's new cache
…Store's new cache
…nse.ListedLicenses and make it generic
…l beyond the WebStore
In my testing locally (on a 4yo MacBook Pro), when the cache is enabled and the entire SPDX listed license & exception corpus is accessed, ~620 files totaling ~20MB are stored in the cache. There are the same number of metadata JSON files written, though they are much smaller (~2MB in total). Once the cache is fully populated, the time the library spent loading the corpus went from ~4 minutes to ~1 second. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good
thanks @pmonks
This PR addresses issue #193 by adding a configurable download cache to the library, and updating
org.spdx.storage.listedlicense.SpdxListedLicenseWebStore
to use that cache. This new cache is disabled by default.Note that this PR also adds a test-only
log4j2-test.xml
file to the test resources of the project, but for some reason it doesn't seem to be getting picked up. After some thought I came to the conclusion that it's probably worth leaving this file in the source code as a visible reminder that it would be great to get to the bottom of that.Note:
mvn -Dorg.spdx.storage.listedlicense.enableCache=true test