                 {}))
 
         cache-files
-        (if (not= SHADOW-TIMESTAMP (:SHADOW-TIMESTAMP cache-index))
+        (if (not= SHADOW-CACHE-KEY (:SHADOW-CACHE-KEY cache-index))
           ;; invalidate all cache when the timestamp of this file has changed
           []
           ;; compare each cache key

          (util/with-logged-time [state {:type ::closure-cache-write
                                         :num-files (count recompile-sources)}]
            (-> cache-index
                (assoc :SHADOW-TIMESTAMP SHADOW-TIMESTAMP
                       :polyfill-js (:polyfill-js state)
                       :injected-libs (::injected-libs state))
                (util/reduce->

                {}))

        cache-files
        (if (not= SHADOW-CACHE-KEY (:SHADOW-CACHE-KEY cache-index))
          ;; invalidate all cache when the timestamp of this file has changed
          []
          ;; compare each cache key
