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

Method Delete

pkg/util/cache/cache.go:923–930  ·  view source on GitHub ↗

Delete an item from the cache. Does nothing if the key is not in the cache.

(k string)

Source from the content-addressed store, hash-verified

921
922// Delete an item from the cache. Does nothing if the key is not in the cache.
923func (c *cache) Delete(k string) {
924 c.mu.Lock()
925 v, evicted := c.delete(k)
926 c.mu.Unlock()
927 if evicted {
928 c.onEvicted(k, v)
929 }
930}
931
932func (c *cache) delete(k string) (interface{}, bool) {
933 if c.onEvicted != nil {

Callers

nothing calls this directly

Calls 2

deleteMethod · 0.95
LockMethod · 0.80

Tested by

no test coverage detected