branch: elpa/projectile
commit cdb22f6b588c8ffa508f6fda586ee1253c73490b
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
[#1926] Don't create an empty cache file when persistent caching is not
enabled
---
projectile.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/projectile.el b/projectile.el
index 273be32d90..60b761f6e5 100644
--- a/projectile.el
+++ b/projectile.el
@@ -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))))