Memoize all the computationally expensive query/diff methods.