MCPcopy Index your code
hub / github.com/serverless/serverless / getUserCachePath

Function getUserCachePath

packages/sf-core/tests/python/test.js:32–44  ·  view source on GitHub ↗

* The static cache path that will be used for this system + options, used if static cache is enabled * @param {Object} options * @return {string}

(options)

Source from the content-addressed store, hash-verified

30 * @return {string}
31 */
32function getUserCachePath(options) {
33 // If we've manually set the static cache location
34 if (options && options.cacheLocation) {
35 return resolve(options.cacheLocation)
36 }
37
38 // Otherwise, find/use the python-ey appdirs cache location
39 const dirs = new Appdir({
40 appName: 'serverless-python-requirements',
41 appAuthor: 'UnitedIncome',
42 })
43 return dirs.userCache()
44}
45
46/**
47 * Helper to get the md5 a a file's contents to determine if a requirements has a static cache

Callers 3

setupFunction · 0.70
teardownFunction · 0.70
test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…