Added inverse matrix cache.