Implemented inverse matrix cache.