Skip to content

Commit cdb22f6

Browse files
committed
[#1926] Don't create an empty cache file when persistent caching is not enabled
1 parent 373fca7 commit cdb22f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projectile.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,9 @@ to invalidate."
10981098
(remhash project-root projectile-projects-cache)
10991099
(remhash project-root projectile-projects-cache-time)
11001100
;; reset the project's cache file
1101-
(projectile-serialize nil (projectile-project-cache-file project-root))
1101+
(when (eq projectile-enable-caching 'persistent)
1102+
;; TODO: Perhaps it's better to delete the cache file in such cases?
1103+
(projectile-serialize nil (projectile-project-cache-file project-root)))
11021104
(when projectile-verbose
11031105
(message "Invalidated Projectile cache for %s."
11041106
(propertize project-root 'face 'font-lock-keyword-face))))

0 commit comments

Comments
 (0)