Skip to content

Commit

Permalink
[#1926] Don't create an empty cache file when persistent caching is n…
Browse files Browse the repository at this point in the history
…ot enabled
  • Loading branch information
bbatsov committed Feb 9, 2025
1 parent 373fca7 commit cdb22f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,9 @@ to invalidate."
(remhash project-root projectile-projects-cache)
(remhash project-root projectile-projects-cache-time)
;; reset the project's cache file
(projectile-serialize nil (projectile-project-cache-file project-root))
(when (eq projectile-enable-caching 'persistent)
;; TODO: Perhaps it's better to delete the cache file in such cases?
(projectile-serialize nil (projectile-project-cache-file project-root)))
(when projectile-verbose
(message "Invalidated Projectile cache for %s."
(propertize project-root 'face 'font-lock-keyword-face))))
Expand Down

0 comments on commit cdb22f6

Please sign in to comment.