Changed the caching order, checks cache first rather than second.