()
| 264 | } |
| 265 | |
| 266 | func (h *contentMetadataHeap) Pop() any { |
| 267 | old := h.data |
| 268 | n := len(old) |
| 269 | item := old[n-1] |
| 270 | h.data = old[0 : n-1] |
| 271 | h.totalDataBytes -= item.Length |
| 272 | delete(h.index, item.BlobID) |
| 273 | |
| 274 | return item |
| 275 | } |
| 276 | |
| 277 | // +checklocks:c.listCacheMutex |
| 278 | func (c *PersistentCache) aboveSoftLimit(extraBytes int64) bool { |