Fixed a cache function.