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

Method Set

cache/file_cache.go:36–44  ·  view source on GitHub ↗
(key string, value string, expiresAt time.Time)

Source from the content-addressed store, hash-verified

34}
35
36func (c FileCache) Set(key string, value string, expiresAt time.Time) {
37 path, err := c.cacheFilePath(key)
38 if err != nil {
39 return
40 }
41 expires := int64(expiresAt.Unix())
42 data := []byte(fmt.Sprintf("%d%s%s", expires, separator, value))
43 _ = os.WriteFile(path, data, cacheFilePermissions)
44}
45
46func (c FileCache) readValue(key string) (int64, string, error) {
47 path, err := c.cacheFilePath(key)

Callers 2

Calls 1

cacheFilePathMethod · 0.95

Tested by 2