MCPcopy Create free account
hub / github.com/UiPath/uipathcli / cacheFilePath

Method cacheFilePath

cache/file_cache.go:67–75  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

65}
66
67func (c FileCache) cacheFilePath(key string) (string, error) {
68 cacheDirectory, err := directories.Cache()
69 if err != nil {
70 return "", err
71 }
72 hash := sha256.Sum256([]byte(key))
73 fileName := hex.EncodeToString(hash[:])
74 return filepath.Join(cacheDirectory, fileName), nil
75}
76
77func NewFileCache() *FileCache {
78 return &FileCache{}

Callers 2

SetMethod · 0.95
readValueMethod · 0.95

Calls 1

CacheFunction · 0.92

Tested by

no test coverage detected