AUR packages tend to be built with the package's name and version as
part of the current-working-directory during building. Specifying
CCACHE_NOHASHDIR=1 will cause ccache to ignore the
current-working-directory when hashing for ccache-cached objects. This
should hopefully fix issues where new package versions tend to cause
cache-misses on build.
command_list.insert(2, "-d")
command_list.insert(3, f'{pkg_state[pkg]["ccache_dir"]}:/ccache')
post_command_list.insert(1, "CCACHE_DIR=/ccache")
+ post_command_list.insert(2, "CCACHE_NOHASHDIR=1")
elif "sccache_dir" in pkg_state[pkg]:
command_list.insert(2, "-d")
command_list.insert(3, f'{pkg_state[pkg]["sccache_dir"]}:/sccache')