fix: separate golang license caches from mod dir (#2852)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow
2024-06-12 19:12:35 -04:00
committed by GitHub
parent dd723bb3c5
commit ca0cc52d47
31 changed files with 1496 additions and 149 deletions
+16
View File
@@ -0,0 +1,16 @@
package cache
import (
"time"
"github.com/spf13/afero"
)
// NewInMemory returns an in-memory only cache manager
func NewInMemory(ttl time.Duration) Manager {
return &filesystemCache{
dir: "",
fs: afero.NewMemMapFs(),
ttl: ttl,
}
}