MCPcopy Create free account
hub / github.com/devspace-sh/devspace / cachePath

Function cachePath

pkg/devspace/config/localcache/config.go:108–116  ·  view source on GitHub ↗

cachePath returns the cache absolute path. The if the default devspace.yaml is given the cache path will be $PWD/.devspace/cache.yaml. For any other file name it will be $PWD/.devspace/cache-[file name]

(devSpaceConfigPath string)

Source from the content-addressed store, hash-verified

106// cachePath returns the cache absolute path. The if the default devspace.yaml is given the cache path
107// will be $PWD/.devspace/cache.yaml. For any other file name it will be $PWD/.devspace/cache-[file name]
108func cachePath(devSpaceConfigPath string) string {
109 fileDir := filepath.Dir(devSpaceConfigPath)
110 fileName := filepath.Base(devSpaceConfigPath)
111 if fileName == constants.DefaultConfigPath {
112 return filepath.Join(fileDir, constants.DefaultCacheFolder, "cache.yaml")
113 }
114
115 return filepath.Join(fileDir, constants.DefaultCacheFolder, fmt.Sprintf("cache-%s", fileName))
116}

Callers 1

LoadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected