Modified how caching is done