A cache simulator