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)
| 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] |
| 108 | func 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 | } |