Cache matrix results.