def clear_instance_cache(cls, func):
        """ clear the instance cache

        Decorate a method of a class, the first parameter is
        supposed to be `self`.
        It clear all items cached by the `instance_cache` decorator.
        :param func: function to decorate
        """

        @functools.wraps(func)
        def func_wrapper(*args, **kwargs):
            if not args:
                raise ValueError('`self` is not available.')
            else:
                the_self = args[0]

            cls.clear_self_cache(the_self)
            return func(*args, **kwargs)

        return func_wrapper
clear the instance cache

        Decorate a method of a class, the first parameter is
        supposed to be `self`.
        It clear all items cached by the `instance_cache` decorator.
        :param func: function to decorate