Eviction pressure score: `current_entries * total_weight / weight`. Higher = more over-proportional → should be evicted from first.
(&self, total_weight: u64)
| 58 | /// Eviction pressure score: `current_entries * total_weight / weight`. |
| 59 | /// Higher = more over-proportional → should be evicted from first. |
| 60 | fn overshoot_score(&self, total_weight: u64) -> u64 { |
| 61 | (self.entries.len() as u64) |
| 62 | .saturating_mul(total_weight) |
| 63 | .saturating_div(self.weight as u64) |
| 64 | } |
| 65 | |
| 66 | /// Evict the oldest (FIFO) entry from this shard. Returns `true` if an |
| 67 | /// entry was removed. |
no test coverage detected