 
 (defun doom--refresh-cache ()
   "TODO"
-  (doom-initialize-packages 'internal)
-  (unless noninteractive
-    (with-temp-buffer
-      (prin1 `(setq load-path ',load-path
-                    Info-directory-list ',Info-directory-list
-                    doom-disabled-packages ',doom-disabled-packages)
-             (current-buffer))
-      (write-file doom-packages-file))))
+  (when doom--init-cache-p
+    (doom-initialize-packages 'internal)
+    (unless noninteractive
+      (with-temp-buffer
+        (prin1 `(setq load-path ',load-path
+                      Info-directory-list ',Info-directory-list
+                      doom-disabled-packages ',doom-disabled-packages)
+               (current-buffer))
+        (write-file doom-packages-file))
+      (setq doom--init-cache-p nil))))
 
 (defun doom-initialize (&optional force-p)
   "Bootstrap the bare essentials to get Doom running, if it hasn't already. If

         ,@(nreverse load-forms))
       ,(unless doom--initializing
          '(unless noninteractive
             (doom-initialize-modules))))))

(defmacro def-package! (name &rest plist)

              (error "✕ Couldn't install %s" package)))
          (message "Installing core packages...done")))
      (cl-pushnew doom-core-dir load-path :test #'string=)
      (setq doom--init-cache-p t))
    (setq doom-init-p t)))

(defun doom-initialize-autoloads ()
