my 2 cents: use a strategy template to be able to model different ideas of the "most fundamental cache functionality." obviously you already have some kind of implementation. one thing you can consider is to look at your code, including cache size options, try to simulate L1 compared to L2 (although in real life it is much more complicated)
source
share