[Yekkanti] Completed the cache matrix implementation