           cache-batched (with-cache stream-cache batched key-fn value-fn)]
       (cache-batched version action dataset collection id validity geometry attributes)))
   (current-validity [_ dataset collection id]
-    (let [key-fn (fn [& params] (->> params (take 3)))
+    (let [key-fn (fn [dataset collection id] [dataset collection id])
           load-cache (fn [dataset collection id]
                        (when (stream-load-cache? dataset collection) (jdbc-load-cache db dataset collection)))
           cached (use-cache stream-cache key-fn load-cache)]
       (first (cached dataset collection id))))
   (last-action [_ dataset collection id]
-    (let [key-fn (fn [& params] (->> params (take 3)))
+    (let [key-fn (fn [dataset collectioni id] [dataset collection id])
           load-cache (fn [dataset collection id]
                        (when (stream-load-cache? dataset collection) (jdbc-load-cache db dataset collection)))
           cached (use-cache stream-cache key-fn load-cache)]

                      dataset parent-collection parent-id child-collection] :as-arrays? true)]
      results)))

(defn- jdbc-insert
  ([db version action dataset collection id validity geometry attributes]
   (jdbc-insert db (list [version action dataset collection id validity geometry attributes])))

    (-> (jdbc-last-stream-validity-and-action db dataset collection id) second))
  (childs [_ dataset parent-collection parent-id child-collection]
    (jdbc-get-childs db dataset parent-collection parent-id child-collection))
  (parent [_ dataset collection id]
    (jdbc-get-parent db dataset collection id))
  (close [this] this)
  )

