Function: projectile-file-exists-cache-cleanup

projectile-file-exists-cache-cleanup is a byte-compiled function defined in projectile.el.

Signature

(projectile-file-exists-cache-cleanup)

Documentation

Remove timed out cache entries.

Also reschedule or remove the timer if no more items are in the cache.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile-file-exists-cache-cleanup ()
  "Remove timed out cache entries.
Also reschedule or remove the timer if no more items are in the cache."
  (let ((now (current-time)))
    (maphash (lambda (key value)
               (if (time-less-p (cdr value) now)
                   (remhash key projectile-file-exists-cache)))
             projectile-file-exists-cache)
    (setq projectile-file-exists-cache-timer
          (if (> (hash-table-count projectile-file-exists-cache) 0)
              (run-with-timer 10 nil 'projectile-file-exists-cache-cleanup)))))