Maybe is problem with Less function although this function is unused.
spring410 opened this issue · comments
spring410 commented
func (p CacheItemPairList) Less(i, j int) bool { return p[i].AccessCount > p[j].AccessCount }
#I think it should be:
return p[i].AccessCount < p[j].AccessCount
#Is that right?
Christian Muehlhaeuser commented
It depends which way you want to sort slices. This is commonly used to sort the cache by most-accessed items, so this is correct.