 (defn- cache-source-fn
   [source-text]
   (fn [x cb]
-    (when (and (= "File" (:name x)) (:source x))
+    (when (:source x)
       (let [source (:source x)
-            [file-namespace relpath] (extract-cache-metadata-mem source-text)]
+            [file-namespace relpath] (extract-cache-metadata-mem source-text)
+            cache-json (when file-namespace
+                         (cljs->transit-json (get-namespace file-namespace)))]
+        (log-cache-activity :write (:name x) cache-json nil)
         (js/PLANCK_CACHE (cache-prefix-for-path relpath false)
           (str (form-compiled-by-string (form-build-affecting-options)) "\n" source)
-          (when file-namespace
-            (cljs->transit-json (get-namespace file-namespace))))))
+          cache-json
+          nil)))
     (cb {:value nil})))
 
 (defn- process-execute-source

        [sourcemap-json _] (or (raw-load (str path ".js.map.json"))
                           (js/PLANCK_READ_FILE (str cache-prefix ".js.map.json")))]
    (when (cached-js-valid? js-source js-modified source-modified)
      (when (:verbose @app-env)
        (println-verbose "Loading precompiled JS"
          (if cache-json "and analysis cache" "")
          (if sourcemap-json "and source map" "")
          "for" path))
      (when (and sourcemap-json name)
        (swap! st assoc-in [:source-maps name] (transit-json->cljs sourcemap-json)))
      (when-not (skip-load-js? name)

          (cljs/eval-str
            (atom @st)
            source-text
            expression-name
            (merge
              {:ns            initial-ns
               :source-map    false
