cache solve() call on a matrix