Where Does ccls Store Its Index Cache?
ccls caches its project index in a .ccls-cache folder per project, separate from editor settings.
Last updated
ccls builds a cross reference index of your codebase and stores it in a cache directory, defaulting to .ccls-cache inside each project root. That folder dwarfs the source tree on large codebases.
Deleting it is always safe. The server rebuilds the index on next open, slowly. Point cache.directory elsewhere in the config to move it off small disks or shared filesystems.
Where ccls stores this, by platform
<project>/.ccls-cache
Default per project cache with the index database. Redirect globally with cache.directory in ~/.config/ccls/ccls.conf. Exclude it from backups and version control.
<project>/.ccls-cache
Same per project default. Config file follows the same XDG path. Spotlight indexing of giant cache folders wastes cycles, so exclude them in settings.
<project>\.ccls-cache
Same scheme on Windows. Config lives at %USERPROFILE%\.ccls.yaml or the XDG equivalent. Case differences in paths can duplicate cache entries.
Frequently asked questions
can i delete the ccls-cache folder
Yes. It holds only derived index data. The server rebuilds it on next project open, trading disk space for reindexing time.
how do i move ccls cache off my project disk
Set cache.directory in the ccls config to a path on the bigger disk. Restart the server and delete the old .ccls-cache folders.
Notice an outdated path? Let us know.