Implemented the cache.

It allows for alot of knobs that will demonstrate the various access types one could want.
Hopefully this counts, it was very tricky to do.