Skip to content

Commit 04f93fe

Browse files
committed
Add documentation for CacheConfig
1 parent bf31ed1 commit 04f93fe

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

lib/dependency-caching.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/dependency-caching.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dependency-caching.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,26 @@ import { Language } from "./languages";
1010
import { Logger } from "./logging";
1111
import { getRequiredEnvParam } from "./util";
1212

13+
/**
14+
* Caching configuration for a particular language.
15+
*/
1316
interface CacheConfig {
17+
/** The paths of directories on the runner that should be included in the cache. */
1418
paths: string[];
19+
/**
20+
* Patterns for the paths of files whose contents affect which dependencies are used
21+
* by a project. We find all files which match these patterns, calculate a hash for
22+
* their contents, and use that hash as part of the cache key.
23+
*/
1524
hash: string[];
1625
}
1726

1827
const CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies";
1928
const CODEQL_DEPENDENCY_CACHE_VERSION = 1;
2029

30+
/**
31+
* Default caching configurations per language.
32+
*/
2133
const CODEQL_DEFAULT_CACHE_CONFIG: { [language: string]: CacheConfig } = {
2234
java: {
2335
paths: [

0 commit comments

Comments
 (0)