Function: projectile-purge-file-from-cache
projectile-purge-file-from-cache is an autoloaded, interactive and
byte-compiled function defined in projectile.el.
Signature
(projectile-purge-file-from-cache FILE)
Documentation
Purge FILE from the cache of the current project.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
;;;###autoload
(defun projectile-purge-file-from-cache (file)
"Purge FILE from the cache of the current project."
(interactive
(list (projectile-completing-read
"Remove file from cache: "
(projectile-current-project-files)
:caller 'projectile-read-file)))
(let* ((project-root (projectile-project-root))
(project-cache (gethash project-root projectile-projects-cache)))
(if (projectile-file-cached-p file project-root)
(let ((new-cache (remove file project-cache)))
(puthash project-root new-cache projectile-projects-cache)
(when (projectile-persistent-cache-p)
(projectile-serialize new-cache (projectile-project-cache-file project-root)))
(when projectile-verbose
(message "%s removed from cache" file)))
(error "%s is not in the cache" file))))