                                                  :status "unprocessed"
                                                  :created (now)
                                                  :aggmap (pr-str aggmap)})
+      (metrics/increment "cache.queue")
       (catch MongoException$DuplicateKey e
         (coll/find-map-by-id *work-collection* (:to aggmap))))))
 

  ([database query not-found]
     (with-db database
       (let [collection (query-to-key query)]
         (if (coll/exists? collection)   
           (extract-result collection query)
           not-found)))))

(defn add-to-cache
  "Add the specified aggregation to the cache by running it through

            [cfpb.qu.util :refer :all]
            [cfpb.qu.data.result :refer [->DataResult]]
            [cfpb.qu.data.aggregation :as agg]
            [cfpb.qu.metrics :as metrics]
            [clojure.string :as str]
            [clojure.core.cache :as cache :refer [defcache]]
            [clj-time.core :refer [now]]
