Pretty much what the title says. For whatever reason projectile-invalidate-cache
does not remove dead files from projectile's cache, or at least not from the results it presents me. I am using Spacemacs, an extension of Emacs, but I believe this issue is specific to projectile.
Restarting the editor does not fix the issue.
One thing to try would be to make sure you are running projectile-invalidate-cache
from the project you want to clear out files for (i.e., from a buffer that is visiting a file in that project. From the docs for projectile-invalidate-cache
:
Remove the current project's files from `projectile-projects-cache'.
Note it is supposed to work only for the "current project".
However, I have also not had much luck with this command (potentially this is me not using the command correctly). What I often end up doing is deleting the actual cache file (in my case this is ~/.emacs.d/projectile.cache
. I have not noticed any negative effects of this, and your cache will be rebuilt without the deleted files next time you use projectile
.
If your project is a git project, try to commit your change. It works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With