Implement matrix "solve" caching.