Simplifying some of the cache code.