Working solution caching a matrix inverse