2025-03-14 21:59:59 -06:00
# ccache
> C/C++ compiler cache.
2025-05-08 12:26:01 -06:00
> Note: Packages usually provide symlinks for compilers in `/usr/lib/ccache/bin`. Prepend this directory to `$PATH` to automatically use `ccache` for them.
2025-03-14 21:59:59 -06:00
> More information: <https://ccache.dev/manual/latest.html>.
2025-04-03 20:36:56 -06:00
- Show current cache statistics:
2025-03-14 21:59:59 -06:00
2025-04-03 20:36:56 -06:00
`ccache {{[-s|--show-stats]}}`
2025-03-14 21:59:59 -06:00
2025-04-03 20:36:56 -06:00
- Clear all cache:
2025-03-14 21:59:59 -06:00
2025-04-03 20:36:56 -06:00
`ccache {{[-C|--clear]}}`
2025-03-14 21:59:59 -06:00
2025-04-03 20:36:56 -06:00
- Reset statistics (but not cache itself):
2025-03-14 21:59:59 -06:00
2025-04-03 20:36:56 -06:00
`ccache {{[-z|--zero-stats]}}`
2025-03-14 21:59:59 -06:00
- Compile C code and cache compiled output (to use `ccache` on all `gcc` invocations, see the note above):
`ccache gcc {{path/to/file.c}}`