MCPcopy Create free account
hub / github.com/cypress-io/github-action / getCypressBinaryCache

Function getCypressBinaryCache

index.js:170–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168debug(`using custom Cypress cache folder "${CYPRESS_CACHE_FOLDER}"`)
169
170const getCypressBinaryCache = () => {
171 const o = {
172 inputPath: CYPRESS_CACHE_FOLDER
173 }
174 const hash = lockHash()
175 const key = `cypress-${platformAndArch}-${hash}`
176
177 // use only exact restore key to prevent cached folder growing in size
178 // https://glebbahmutov.com/blog/do-not-let-cypress-cache-snowball/
179 o.restoreKeys = o.primaryKey = key
180 return o
181}
182
183const restoreCachedNpm = () => {
184 debug('trying to restore cached npm modules')

Callers 2

saveCachedCypressBinaryFunction · 0.85

Calls 1

lockHashFunction · 0.85

Tested by

no test coverage detected