Adding a cache system, work in progress.