Cache entropy matrix

This is just a merge of