fix: use a cache file name with a fixed size. (#350)

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
Matthis
2023-04-27 11:59:30 +02:00
committed by GitHub
parent 3af366788f
commit dee423519e
6 changed files with 42 additions and 53 deletions

View File

@@ -11,7 +11,13 @@ import (
var _ (ICache) = (*FileBasedCache)(nil)
type FileBasedCache struct{}
type FileBasedCache struct {
noCache bool
}
func (f *FileBasedCache) IsCacheDisabled() bool {
return f.noCache
}
func (*FileBasedCache) Exists(key string) bool {
path, err := xdg.CacheFile(filepath.Join("k8sgpt", key))