Cache Simulator code