update cachematrix