Refactor the cache source