use cache instead of settings to save env id