File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ Next release
88 ``licensedcode-data ``.
99 https://github.com/aboutcode-org/scancode-toolkit/pull/5056
1010
11- - Add experimental option for using cached results during scan time.
11+ - Add experimental option for using cached results during scan time. When the
12+ ``--use-cached-results `` option is enabled in the ScanCode CLI, during scan
13+ time for a given Resource, we iterate through the active scanners and see if we
14+ have cached results for those already. If we do, we update our results with the
15+ cached data. If not, we add those scanners to a list of scanners to be run.
16+ After scanning, the cache is updated.
1217
1318v33.0.0rc1 - 2026-05-14
1419------------------------
Original file line number Diff line number Diff line change 1616from scancode_config import results_cache_dir
1717
1818
19+ """
20+ This module provides functions for the storage, retrieval, and organization of
21+ cached ScanCode scanner results.
22+
23+ The cache is stored in the ScanCode .cache directory. Depending on the setup,
24+ this could either be in the .cache directory in the user's home folder for a
25+ particular ScanCode version (in the case of running a ScanCode release) or in
26+ the .cache directory in the ScanCode directory (in the case of running a
27+ ScanCode git checkout).
28+
29+ In the .cache directory, the scanner results for a given Resource is stored in a
30+ directory whose path is created from the sha256 hexdigest of the Resource's
31+ content and its filename. Inside the results directory are JSON files with the
32+ name of scanners (license, copyright, etc.) and inside are the cached results.
33+
34+ When the --use-cached-results option is enabled in the ScanCode CLI, during scan
35+ time for a given Resource, we iterate through the active scanners and see if we
36+ have cached results for those already. If we do, we update our results with the
37+ cached data. If not, we add those scanners to a list of scanners to be run.
38+ After scanning, the cache is updated.
39+ """
40+
1941def hasher_from_chunks (chunks ):
2042 """
2143 Return a sha256 hasher loaded with `chunks`.
You can’t perform that action at this time.
0 commit comments