Cleaning up the cache API a little.