MCPcopy Create free account
hub / github.com/engineerd/setup-kind / restoreKindCache

Function restoreKindCache

src/cache.ts:32–51  ·  view source on GitHub ↗
(
  version: string
)

Source from the content-addressed store, hash-verified

30 * @param version
31 */
32export async function restoreKindCache(
33 version: string
34): Promise<CacheParameters> {
35 const primaryKey = kindPrimaryKey(version);
36 const cachePaths = kindCachePaths(version);
37
38 core.debug(`Primary key is ${primaryKey}`);
39
40 const matchedKey = await cache.restoreCache(cachePaths, primaryKey);
41
42 if (matchedKey) {
43 core.info(`Cache setup-kind restored from key: ${matchedKey}`);
44 } else {
45 core.info('Cache setup-kind is not found');
46 }
47 return {
48 paths: cachePaths,
49 primaryKey: primaryKey,
50 };
51}
52/**
53 * Defines the cache paths
54 * It is the folder where kind will be stored in the tool-cache

Callers

nothing calls this directly

Calls 2

kindPrimaryKeyFunction · 0.85
kindCachePathsFunction · 0.85

Tested by

no test coverage detected