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

Method get

pkg/util/cache/cache.go:186–198  ·  view source on GitHub ↗
(k string)

Source from the content-addressed store, hash-verified

184}
185
186func (c *cache) get(k string) (interface{}, bool) {
187 item, found := c.items[k]
188 if !found {
189 return nil, false
190 }
191 // "Inlining" of Expired
192 if item.Expiration > 0 {
193 if time.Now().UnixNano() > item.Expiration {
194 return nil, false
195 }
196 }
197 return item.Object, true
198}
199
200// Increment an item of type int, int8, int16, int32, int64, uintptr, uint,
201// uint8, uint32, or uint64, float32 or float64 by n. Returns an error if the

Callers 3

AddMethod · 0.95
ReplaceMethod · 0.95
testFillAndSerializeFunction · 0.45

Calls

no outgoing calls

Tested by 1

testFillAndSerializeFunction · 0.36