diff options
| author | Bozhidar Batsov <bozhidar@toptal.com> | 2025-02-09 08:05:25 +0200 |
|---|---|---|
| committer | Bozhidar Batsov <bozhidar@toptal.com> | 2025-02-09 08:05:25 +0200 |
| commit | cdb22f6b588c8ffa508f6fda586ee1253c73490b (patch) | |
| tree | 9c5305b45ba4cb8916d733892740bc058fc88c93 /projectile.el | |
| parent | 373fca78904330cc130604c9490c4e0785df7c4d (diff) | |
[#1926] Don't create an empty cache file when persistent caching is not enabled
Diffstat (limited to 'projectile.el')
| -rw-r--r-- | projectile.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/projectile.el b/projectile.el index 273be32..60b761f 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)))) |
