Initial version of matrix cache