@classmethod
def register_update_fail_callback(cls, callback, raise_exc=False):
    """Reigister callback.

        :param callback: func to callback
        :param raise_exc: whether to raise exception if occur, default to false
        """
    assert callable(callback), 'callback should be callable!'
    cls._update_cache_fail_callback.add((callback, raise_exc))
