MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / Set

Method Set

pkg/util/cache/watch_cache.go:67–73  ·  view source on GitHub ↗
(k string, x interface{}, d time.Duration)

Source from the content-addressed store, hash-verified

65}
66
67func (wc *WatchCacheStore) Set(k string, x interface{}, d time.Duration) error {
68 if !wc.available {
69 return ErrorCacheNotAvilable
70 }
71 wc.cache.Set(k, x, d)
72 return nil
73}
74
75func (wc *WatchCacheStore) SetDefault(k string, x interface{}) error {
76 return wc.Set(k, x, DefaultExpiration)

Callers 1

SetDefaultMethod · 0.95

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected