cachematrix.r cach works