                   (fn-flusher))]
     [delayer flusher]))
 
-(defn set-pkeys!
+(defn- set-pkeys!
   [mkeys tenant period rollup time ttl fn-get fn-agg fn-store fn-key]
   (let [mkey (construct-mkey tenant period rollup time)]
     (swap! mkeys

          (deref flusher)))))
  (debug "The cache has been flushed"))

(defn store-chan
  [chan tenant period rollup time path data ttl]
  (>!! chan {:tenant tenant
             :period period

                (assoc % mkey pkeys))))
    (get @mkeys mkey)))

(defn- set-keys!
  [mkeys tenant period rollup time path ttl fn-get fn-agg fn-store fn-key]
  (let [pkeys (set-pkeys! mkeys tenant period rollup time ttl fn-get
                          fn-agg fn-store fn-key)]
    (swap! pkeys #(if (contains? % path) % (conj % path)))
    pkeys))

(defn- run-flusher!
  [mkeys]
  (debug "Flushing the cache...")
  (doseq [[mkey pkeys] @mkeys]
