Matrix cache implementation and comments