Caching the inverse of a Matrix