Cached matrix solve