cache matrix for nnls