Updated the use of caching.