performEviction will evict the oldest items in the cache till we are below the memory threshold
(ctx context.Context)
| 889 | |
| 890 | // performEviction will evict the oldest items in the cache till we are below the memory threshold |
| 891 | func (rc *LRURevisionCache) performEviction(ctx context.Context) { |
| 892 | numItemsRemoved := rc.evictBasedOffMemoryUsage(ctx) |
| 893 | rc.cacheNumItems.Add(-numItemsRemoved) |
| 894 | } |
| 895 | |
| 896 | func (rc *LRURevisionCache) evictBasedOffMemoryUsage(ctx context.Context) int64 { |
| 897 | var numItemsRemoved, numBytesRemoved int64 |
no test coverage detected