Skip to content

System resource cache - #5289

Open
JonoYang wants to merge 13 commits into
developfrom
system-resource-cache
Open

System resource cache#5289
JonoYang wants to merge 13 commits into
developfrom
system-resource-cache

Conversation

@JonoYang

@JonoYang JonoYang commented Aug 25, 2026

Copy link
Copy Markdown
Member

This PR introduces a cache for the results of scanners run by scancode. The scancode, scan_codebase, and scan_resource functions have been updated to look for cached scan results to reuse before scanning. The cache is updated after scanning, if it was required.

This is related to #3941

results_cache_index=results_cache_index,
plugin_name=plugin_name
)
if os.path.exists(results_cache_file_location):
plugin_name=plugin_name
)
if os.path.exists(results_cache_file_location):
with open(results_cache_file_location) as f:
results_cache_directory_location = get_results_cache_directory_location(
results_cache_index=results_cache_index
)
if not os.path.exists(results_cache_directory_location):
if not os.path.exists(results_cache_directory_location):
create_dir(results_cache_directory_location)
results_cache_file_location = os.path.join(results_cache_directory_location, plugin_name)
with open(results_cache_file_location, 'w') as f:
'b0/e3/dd13b9b5980bb1ca7aab89e5490cb136952374489a755947ac004309b035',
test_plugin_name
)
with open(results_cache_file_location) as f:
Signed-off-by: Jono Yang <jyang@nexb.com>
    * Use sha256 instead of md5

Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
    * Create envvar for controlling whether or not the scan results cache is used

Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
Signed-off-by: Jono Yang <jyang@nexb.com>
@JonoYang
JonoYang force-pushed the system-resource-cache branch from a1aa058 to 60ee685 Compare August 28, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants