MCPcopy Create free account
hub / github.com/Swatinem/rust-cache / getCacheProvider

Function getCacheProvider

src/utils.ts:60–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60export function getCacheProvider(): CacheProvider {
61 const cacheProvider = core.getInput("cache-provider");
62 let cache: GhCache;
63 switch (cacheProvider) {
64 case "github":
65 cache = ghCache;
66 break;
67 case "buildjet":
68 cache = buildjetCache;
69 break;
70 case "warpbuild":
71 cache = warpbuildCache;
72 break;
73 default:
74 throw new Error(`The \`cache-provider\` \`${cacheProvider}\` is not valid.`);
75 }
76
77 return {
78 name: cacheProvider,
79 cache: cache,
80 };
81}
82
83export async function exists(path: string) {
84 try {

Callers 2

runFunction · 0.90
runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected