Inverse matrix cache final

Inverse matrix cache