code: func (c *CCache) Search(ctx context.Context, metric schema.AMKey, from, until uint32) (*CCSearchResult, error) {
  	if from >= until {
  		return nil, ErrInvalidRange
  	}
  
  	res := &CCSearchResult{
  		From:  from,
  		Until: until,
  	}
  
  	if c == nil {
  		accnt.CacheMetricMiss.Inc()
  		return res, nil
  	}
  
  	ctx, span := tracing.NewSpan(ctx, c.tracer, "CCache.Search")
  	defer span.Finish()
  
  	c.RLock()
  	defer c.RUnlock()
  
  	cm, ok := c.metricCache[metric]
  	if !ok {
  		span.SetTag("cache", "miss")
  		accnt.CacheMetricMiss.Inc()
  		return res, nil
  	}
  
  	cm.Search(ctx, metric, res, from, until)
  	if len(res.Start) == 0 && len(res.End) == 0 {
  		span.SetTag("cache", "miss")
  		accnt.CacheMetricMiss.Inc()
  	} else {
  
  		accnt.CacheChunkHit.Add(len(res.Start) + len(res.End))
  		go func() {
  			c.accnt.HitChunks(metric, res.Start)
  			c.accnt.HitChunks(metric, res.End)
  		}()
  
  		if res.Complete {
  			span.SetTag("cache", "hit-full")
  			accnt.CacheMetricHitFull.Inc()
  		} else {
  			span.SetTag("cache", "hit-partial")
  			accnt.CacheMetricHitPartial.Inc()
  		}
  	}
  
  	return res, nil
  }
docs: // Search looks for the requested metric and returns a complete-as-possible CCSearchResult
  // from is inclusive, until is exclusive