Refactoring to use single cache file