trying to more elegantly handle updating the cache files