Copy pasted the changes made to add a cache