Change the cache function.