First version of matrix in cache script