moved cache creation to prepare_database