Don't set the config cache if it is disabled (for unit tests)