Backport the fix for CACHEDIR to 9.2