(k string)
| 930 | } |
| 931 | |
| 932 | func (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 | |
| 943 | type keyAndValue struct { |
| 944 | key string |
no outgoing calls