(k string)
| 152 | } |
| 153 | |
| 154 | func (c *cache) delete(k string) (interface{}, bool) { |
| 155 | // |
| 156 | if c.onEvicted != nil { |
| 157 | if v, found := c.items[k]; found { |
| 158 | delete(c.items, k) |
| 159 | return v.Object, true |
| 160 | } |
| 161 | } |
| 162 | delete(c.items, k) |
| 163 | return nil, false |
| 164 | } |
| 165 | |
| 166 | func (c *cache) Delete(k string) { |
| 167 | c.mu.Lock() |
no outgoing calls
no test coverage detected