Another major caching refactor.