AddEntry adds a value to the cache. It provides an alternative interface to Add which the caller can use to reduce allocations by bundling the Entry structure with the key and value to be stored.
(entry *Entry)
| 208 | // Add which the caller can use to reduce allocations by bundling the Entry |
| 209 | // structure with the key and value to be stored. |
| 210 | func (bc *baseCache) AddEntry(entry *Entry) { |
| 211 | bc.add(entry.Key, entry.Value, entry, nil) |
| 212 | } |
| 213 | |
| 214 | // AddEntryAfter adds a value to the cache, making sure that it is placed after |
| 215 | // the second entry in the eviction queue. It provides an alternative interface to |