Cache matrix inverse.