Function: projectile-cache-files-find-file-hook

projectile-cache-files-find-file-hook is a byte-compiled function defined in projectile.el.

Signature

(projectile-cache-files-find-file-hook &optional PROJECT-ROOT)

Documentation

Function for caching files with find-file-hook.

PROJECT-ROOT defaults to the current project.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
;; cache opened files automatically to reduce the need for cache invalidation
(defun projectile-cache-files-find-file-hook (&optional project-root)
  "Function for caching files with `find-file-hook'.
PROJECT-ROOT defaults to the current project."
  (let ((project-root (or project-root (projectile-project-p))))
    (when (and projectile-enable-caching
               project-root
               (not (projectile-ignored-project-p project-root)))
      (projectile-cache-current-file project-root))))