         (let [r (make-reaction
                  f :on-dispose (fn [x]
                                  (when debug (swap! -running dec))
-                                 (let [c cached-reactions
-                                       m (-> (get c k1)
-                                             (dissoc! k2))
-                                       c (if (zero? (count m))
-                                           (dissoc! c k1)
-                                           (assoc! c k1 m))]
-                                   (set! cached-reactions c))
+                                 (as-> (aget o cache-key) _
+                                   (dissoc _ k)
+                                   (aset o cache-key _))
                                  (when-not (nil? obj)
                                    (set! (.-reaction obj) nil))
                                  (when-not (nil? destroy)
                                    (destroy x))
                                  nil))
               v (-deref r)]
-          (->> (assoc! m k2 r)
-               (assoc! cached-reactions k1)
-               (set! cached-reactions))
+          (aset o cache-key (assoc m k r))
           (when debug (swap! -running inc))
           (when-not (nil? obj)
             (set! (.-reaction obj) r))

  (-deref [this]
    (if-some [r reaction]
      (-deref r)
      (cached-reaction #(apply f args) (goog/getUid f) args this nil)))

  IEquiv
  (-equiv [_ other]

        nocache (if (nil? no-cache) false no-cache)
        reaction (Reaction. f nil dirty nil nil
                            runner on-set on-dispose nocache)]
    (when-not (nil? capture)
      (when-some [c (aget capture cache-key)]
        (aset reaction cache-key c)))
    ;; TODO: get rid of reaction-id
    (when-some [rid (some-> capture .-reaction-id)]
      (set! (.-reaction-id reaction) rid))
    (when-not (nil? derefed)
