save matrix to cache
solve and save to cache