You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Personally I fixed that in the package https://github.com/nictuku/nettools/blob/master/ratelimit.go
as follow:
func cacheValueSize(val interface{}) int64 {
return 8
}
and replaced cache.NewLRUCache(maxHosts) by cache.NewLRUCache(maxHosts,cacheValueSize)
https://github.com/vitessio/vitess/blob/master/go/cache/lru_cache.go
they have added a cost
type LRUCache struct {
mu sync.Mutex
// list & table contain *entry objects.
list *list.List
table map[string]*list.Element
cost func(interface{}) int64
size int64
capacity int64
evictions int64
}
The text was updated successfully, but these errors were encountered: