Matrix inverse cache implementation.