Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,23 @@ argument)."
(when (fboundp 'recentf-cleanup)
(recentf-cleanup)))

;;;###autoload
(defun projectile-invalidate-all-caches ()
"Remove the cache files for all known projects."
(interactive)
(setq projectile-project-root-cache (make-hash-table :test 'equal))
(clrhash projectile-project-type-cache)
(let ((projects (hash-table-keys projectile-projects-cache)))
(clrhash projectile-projects-cache)
(clrhash projectile-projects-cache-time)
(when (projectile-persistent-cache-p)
(dolist (project-root projects)
(projectile-serialize nil (projectile-project-cache-file project-root)))))
(when projectile-verbose
(message "Invalidated Projectile cache for all projects."))
(when (fboundp 'recentf-cleanup)
(recentf-cleanup)))

(defun projectile-time-seconds ()
"Return the number of seconds since the unix epoch."
(time-convert nil 'integer))
Expand Down