Purge excess from projectile's cache

Bloated projectile caches can cause freezing and delays. This is
especially so if you accidentally index $HOME or /, which will bloat
them into the hundreds of MBs.

+ Adds purging of blacklisted, over-sized and non-projects from
  projectile's cache when Emacs is killed.
+ Projectile's project file cache will now expire after a week.
+ Corrects file paths in core/doctor's filesize checks.
This commit is contained in:
Henrik Lissner 2019-03-28 18:27:45 -04:00
parent 0085d089f3
commit c0b00327c2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 42 additions and 2 deletions

View file

@ -10,7 +10,7 @@
;; delays or freezing. This shouldn't happen often.
(dolist (file (list "savehist"
"projectile.cache"))
(let* ((path (expand-file-name file doom-core-dir))
(let* ((path (expand-file-name file doom-cache-dir))
(size (file-size path)))
(when (and (numberp size) (> size 2000))
(warn! "%s is too large (%.02fmb). This may cause freezes or odd startup delays"