                       (.getPath ^File res)
                       (.getPath ^URL res))
                cache (when (or (= (:ns ns-info) 'cljs.core)
-                               (and (:cache-analysis opts) output-dir))
+                               (:cache-analysis opts))
                        (cache-file res ns-info output-dir))]
            (when-not (get-in @env/*compiler* [::namespaces (:ns ns-info)])
-             (if (or (not= (:ns ns-info) 'cljs.core)
-                     (not cache)
+             (if (or (not cache)
                      (requires-analysis? res output-dir))
                (binding [*cljs-ns* 'cljs.user
                          *cljs-file* path

  ([env form] (analyze env form nil))
  ([env form name] (analyze env form name nil))
  ([env form name opts]
    (env/ensure
      (wrapping-errors env
        (reduce (fn [ast pass] (pass env ast))

   \":output-dir/some/ns/foo.cljs.cache.edn\". This function does not return a
   meaningful value."
  ([f] (analyze-file f nil))
  ([f opts]
   (binding [*file-defs* (atom #{})]
     (let [output-dir (util/output-directory opts)
           res (cond
                 (instance? File f) f
                 (instance? URL f) f
                 (re-find #"^file://" f) (URL. f)
