Updating cachematrix