'Associate key and value in the cache.
@param key: the key
@type key: (dns.name.Name, int, int) tuple whose values are the
query name, rdtype, and rdclass.
@param value: The answer being cached
@type value: dns.resolver.Answer object'

def put(self, key, value):

    try:
        self.lock.acquire()
        self._maybe_clean()
        self.data[key] = value
    finally:
        self.lock.release()
