The solution to this issue was to make the disabled cache factory return a proper cache writer object when requested rather than a disabled cache object. This only changes things when CACHE_DISABLE_ALL has been defined.