Pārlūkot izejas kodu

Issue #173 add cluster filter to aggregation cache key

Niko Kovacevic 6 gadi atpakaļ
vecāks
revīzija
faf0d6a1a8
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      costmodel/router.go

+ 1 - 1
costmodel/router.go

@@ -325,7 +325,7 @@ func (a *Accesses) AggregateCostModel(w http.ResponseWriter, r *http.Request, ps
 		a.Cache.Flush()
 		a.Cache.Flush()
 	}
 	}
 
 
-	aggKey := fmt.Sprintf("aggregate:%s:%s:%s:%s:%s:%t", window, offset, namespace, field, subfield, timeSeries)
+	aggKey := fmt.Sprintf("aggregate:%s:%s:%s:%s:%s:%s:%t", window, offset, namespace, cluster, field, subfield, timeSeries)
 
 
 	// check the cache for aggregated response; if cache is hit and not disabled, return response
 	// check the cache for aggregated response; if cache is hit and not disabled, return response
 	if result, found := a.Cache.Get(aggKey); found && !disableCache {
 	if result, found := a.Cache.Get(aggKey); found && !disableCache {