corrected nameing

This commit is contained in:
Todd Gruben 2017-08-28 14:15:59 -05:00
parent 60ee6dcfdd
commit 773019a0f3

View file

@ -256,10 +256,10 @@ func (c *RankCache) recalculate() {
length := len(c.rankings)
c.stats.Gauge("RankCache", float64(length), 1.0)
var remove_items []BitmapPair // cached, ordered list
var removeItems []BitmapPair // cached, ordered list
if length > int(c.maxEntries) {
c.thresholdValue = rankings[c.maxEntries].Count
remove_items = c.rankings[c.maxEntries:]
removeItems = c.rankings[c.maxEntries:]
c.rankings = c.rankings[0:c.maxEntries]
} else {
c.thresholdValue = 1
@ -271,7 +271,7 @@ func (c *RankCache) recalculate() {
// If size is larger than the threshold then trim it.
if len(c.entries) > c.thresholdBuffer {
c.stats.Count("cache.threshold", 1, 1.0)
for _, pair := range remove_items {
for _, pair := range removeItems {
delete(c.entries, pair.ID)
}
}