func slicifyRing(r *ring.Ring) { l := r.Len() s := make([]WindowData, 0, l) for i := 0; i < l; i++ { s = append(s, r.Value.(WindowData)) r = r.Prev() } }
func slicifyRing(r *ring.Ring) { l := r.Len() s := make([]float64, 0, l) for i := 0; i < l; i++ { s = append(s, r.Value.(float64)) r = r.Prev() } }
func (c *Cache) meta_del(r *ring.Ring) { delete(c.keys, r.Value.(*entry).key) if r == c.hand_hot { c.hand_hot = c.hand_hot.Prev() } if r == c.hand_cold { c.hand_cold = c.hand_cold.Prev() } if r == c.hand_test { c.hand_test = c.hand_test.Prev() } r.Prev().Unlink(1) }