[ccache] Multiple directories for CCACHE_DIR?

Joel Rosdahl joel at rosdahl.net
Tue May 17 19:10:36 UTC 2016

Hi Wilson,

On 17 May 2016 at 08:50, Wilson Hong <wilson100hong at gmail.com> wrote:
> One thing I wanna try is to have multiple folders specified in CCACHE_DIR.
> [...] Is that supported in ccache?


> If not, would be a good idea to implement that?

I think that it could be interesting to investigate, but there are lots of
things to think about before implementing it. For instance:

What should happen on a cache miss? Should ccache store the result in all
directories? That could potentially be quite slow. Or should it only store
the result in the first directory? If so, when and how do the other
directories get populated?

How should configuration file settings work? Should configuration be read
only from one cache directory or from all?

Cache size configuration probably would need to be configured per cache
directory. Does this imply that CCACHE_MAXSIZE variable no longer should
override configuration file settings?

Which statistics counters would make sense to have in all cache directories
(cache hit/miss, etc.) and which would not make sense (called for link,
compile failed, etc.)?

-- Joel

More information about the ccache mailing list