A cache simulator  in python