Work in progress. Decided to break up the different types of cache
so that the code could be more modular.