Implemented caching the Inverse of a Matrix