code: private String constructMetricQueryKey(Long startTimeStampBoundary, Metric metric, MetricQuery query) {
          StringBuilder sb = new StringBuilder();
  
          sb.append(startTimeStampBoundary).append(":");
          sb.append(query.getNamespace()).append(":");
          sb.append(query.getScope()).append(":");
          sb.append(query.getMetric()).append(":");
  
          Map<String, String> treeMap = new TreeMap<>();
  
          treeMap.putAll(metric.getTags());
          sb.append(treeMap).append(":");
          sb.append(query.getAggregator()).append(":");
          sb.append(query.getDownsampler()).append(":");
          sb.append(query.getDownsamplingPeriod());
          return sb.toString();
      }
docs: Constructs a cache key from start time stamp boundary, returned metric tags and metric query.
  
  @param   startTimeStampBoundary  The start time stamp boundary.
  @param   metric                  The metric to construct the cache key for.
  @param   query                   The query to use to construct the cache key.
  
  @return  The cache key.