Initial cache matrix implementation