set new_app flag at the beginning
extract load default cache into a method