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

Method delete

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

Source from the content-addressed store, hash-verified

930}
931
932func (c *cache) delete(k string) (interface{}, bool) {
933 if c.onEvicted != nil {
934 if v, found := c.items[k]; found {
935 delete(c.items, k)
936 return v.Object, true
937 }
938 }
939 delete(c.items, k)
940 return nil, false
941}
942
943type keyAndValue struct {
944 key string

Callers 3

DeleteMethod · 0.95
DeleteExpiredMethod · 0.95

Calls

no outgoing calls

Tested by 1