       (when-not (load-and-callback!
                   (str path (first extensions))
                   (extension->lang (first extensions))
-                  (cache-prefix-for-path path)
+                  (cache-prefix-for-path path macros)
                   cb)
         (recur (next extensions)))
       (cb nil))))

(defn- cached-callback-data
  [path cache-prefix source source-modified raw-load]
  (let [cache-prefix (if (= :calculate-cache-prefix cache-prefix)
                       (cache-prefix-for-path (second (extract-cache-metadata-mem source)))
                       cache-prefix)
        [js-source js-modified] (or (raw-load (add-suffix path ".js"))
                                    (js/PLANCK_READ_FILE (str cache-prefix ".js")))

      clj->js)))

(defn- cache-prefix-for-path
  [path macros]
  (str (:cache-path @app-env) "/" (munge path) (when macros "$macros")))

(defn- extract-cache-metadata
  [source]
