Added cache inverse of a matrix