cache matrix assignment