Cache matrix
Revert "Cache matrix"

This reverts commit e2cb13d6daae480bce92f2eb65ee9e8d09ad18ee.