Initial working version of the cache.