cache matrix with example