Implement inverse matrix caching functions.