Sorted out caching

Previously wasn't caching for phase 3.