 (defn create-flusher
   [mkeys mkey pkeys tenant period rollup time ttl fn-get fn-agg fn-store fn-key]
   (fn []
-    (doseq [path @pkeys]
-      (fn-store tenant period rollup time path
-                (fn-agg (fn-get
-                         (fn-key tenant period rollup time path)
-                         @pkeys)) ttl))
-    (swap! mkeys #(dissoc % mkey))))
+    (try
+      (doseq [path @pkeys]
+        (fn-store tenant period rollup time path
+                  (fn-agg (fn-get
+                           (fn-key tenant period rollup time path)
+                           @pkeys)) ttl))
+      (swap! mkeys #(dissoc % mkey))
+      (catch Exception e
+        (info e "Cache flushing exception")))))
 
 (defn run-delayer!
   [rollup fn-flusher]

        cache-get (fn [key pkeys] (get @(get-data pkeys) key))
        cache-key (fn [tenant period rollup time path] (hash path))
        schan (store/channel-for store)
        fn-store (partial store-chan schan)]
    (reify
      StoreCache
      (put! [this tenant period rollup time path data ttl]

              pkeys (set-keys! mkeys tenant period rollup time path ttl
                               cache-get fn-agg fn-store cache-key)
              adata (get-data @pkeys)]
          (swap! adata #(assoc % ckey (conj (get % ckey) data)))
          ;;(-show-keys this)
          ;;(-show-cache this)
          ;;(-show-meta this)
          ))
      (flush! [this]
        (run-flusher! mkeys))
      (-show-keys [this] (debug "MKeys:" mkeys))
      (-show-cache [this]
        (debug "Cache:")
        (doseq [[mkey pkeys] @mkeys]
          (debug (get-data @pkeys))))
      (-show-meta [this]
        (doseq [[mkey pkeys] @mkeys]
          (debug "Meta:" mkey (meta @pkeys)))))))
