Test for cache matrix