Refactoring how assets are cached