Implement matrix inverse cache.