Search code examples
c++lruccachemru

Which cache algorithm is used in ccache?


I was trying to find any information about cache algorithm that are used in ccache, but didn't find anything. So, does anyone know how ccache evict elements when max_size is reached? LRU? MRU? "Ring buffer"?


Solution

  • Now I found in source code that ccache are using LRU: https://github.com/ccache/ccache/blob/c33cd219f85449078034ff75b54fd499549cf4e4/cleanup.c#L22