                         failure(error)
                         return
                     }
-                    log.warning("Caching minmax aggregates for \(key)")
+                    log.warning("Caching minmax aggregates for \(key) ")
                     success(MCAggregateArray(aggregates: aggregates), .Date(self.getCacheExpiry(period)))
                 }
             }
         }, completion: {object, isLoadedFromCache, error in
             log.warning("Cache minmax result \(key) \(isLoadedFromCache)")
             if let aggArray = object {
+                log.warning("Cache minmax result \(key) size \(aggArray.aggregates.count)")
                 completion(aggArray.aggregates.map { finalize(.DiscreteMin, $0) }, aggArray.aggregates.map { finalize(.DiscreteMax, $0) }, error)
             } else {
                 completion([], [], error)

        }, completion: {object, isLoadedFromCache, error in
            log.warning("Cache result \(key) \(isLoadedFromCache)")
            if let aggArray = object {
                self.queryResultAsSamples(.AggregatedSamples(aggArray.aggregates), error: error, completion: completion)
            } else {
                completion(samples: [], error: error)

                    }

                    if let aggArray = self.aggregateCache[key] {
                        let mins = aggArray.aggregates.map { return finalizeAgg(.DiscreteMin, $0).numeralValue! }
                        let maxs = aggArray.aggregates.map { return finalizeAgg(.DiscreteMax, $0).numeralValue! }
                        completion([maxs, mins])
                    }
                }
            }
