简体   繁体   中英

Improving the ccache hit rate

I am working with distcc and ccache to speed up the compilation of my project.

I noticed that I am not getting any hits when I am building the same code from different directories. I looked up online https://github.com/ccache/ccache/issues/212 and saw that I need to set the hash_dir flag = false . I already have the variable CCACHE_NOHASHDIR=true . Am I missing something? Do I need to set/unset any other variables?

Does your command line contain absolute paths? If so, you need to set CCACHE_BASEDIR to the base directory of your working copy. See How do I make ccache cache compilation when using absolute paths to the compiled files in different directories? .

I wrote ccache quick guide which explains how to debug and avoid cache misses.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM