import socket

class Resolver:

#Initialises the Resolver class with a callable function eg. resolve = Resolver()// resolve._cache
    def __init__(self):
        self._cache = {}

#Adds a callable function which resolve('hostname.com') will return the IP of hostname and add hostname into cache
    def __call__(self, host):
        if host not in self._cache:
            self._cache[host] = socket.gethostbyname(host)
        return self._cache[host]

#Clears the list of cache created by __call__
    def clear(self):
        self._cache.clear()

#Checks if resolver.has_host(hostname.com) is in cache - returns boolean
    def has_host(self, host):
        return host in self._cache
8476aa2b4fc7f837c63b338ba31fb6ec44da0c4a
<mask token>


class Resolver:

    def __init__(self):
        self._cache = {}
    <mask token>
    <mask token>

    def has_host(self, host):
        return host in self._cache

<mask token>


class Resolver:

    def __init__(self):
        self._cache = {}
    <mask token>

    def clear(self):
        self._cache.clear()

    def has_host(self, host):
        return host in self._cache

<mask token>


class Resolver:

    def __init__(self):
        self._cache = {}

    def __call__(self, host):
        if host not in self._cache:
            self._cache[host] = socket.gethostbyname(host)
        return self._cache[host]

    def clear(self):
        self._cache.clear()

    def has_host(self, host):
        return host in self._cache

import socket


class Resolver:

    def __init__(self):
        self._cache = {}

    def __call__(self, host):
        if host not in self._cache:
            self._cache[host] = socket.gethostbyname(host)
        return self._cache[host]

    def clear(self):
        self._cache.clear()

    def has_host(self, host):
        return host in self._cache

import socket

class Resolver:

#Initialises the Resolver class with a callable function eg. resolve = Resolver()// resolve._cache
    def __init__(self):
        self._cache = {}

#Adds a callable function which resolve('hostname.com') will return the IP of hostname and add hostname into cache
    def __call__(self, host):
        if host not in self._cache:
            self._cache[host] = socket.gethostbyname(host)
        return self._cache[host]

#Clears the list of cache created by __call__
    def clear(self):
        self._cache.clear()

#Checks if resolver.has_host(hostname.com) is in cache - returns boolean
    def has_host(self, host):
        return host in self._cache