diff --git a/cache.go b/cache.go index 86cab6b5a..8eab72368 100644 --- a/cache.go +++ b/cache.go @@ -243,6 +243,8 @@ type PairHeap struct { Pairs } +func (p PairHeap) Less(i, j int) bool { return p.Pairs[i].Count < p.Pairs[j].Count } + func (h *Pairs) Push(x interface{}) { // Push and Pop use pointer receivers because they modify the slice's length, // not just its contents.