import warnings


def _method_cache_key_generator(*args, **kwargs) -> int:
    """A cache key generator implementation for methods.

    This generator does not implement any hashing for keyword arguments.
    Additionally, it skips the first argument provided to the function,
    which is assumed to be a class instance and not of importance for the key.

    Warnings:
        When keyword arguments are provided, outputs
        a log message with the severity `warning`.
    """

    if kwargs:
        warnings.warn(
            f"Got keyword arguments {kwargs!r}, but this key "
            "generator only supports regular arguments."
        )

    return hash(args[1:])