When we find a class-independent type, cache it for both class ANY and
the requested type, to avoid an extra dict lookup the next time. If we
don't find anything, cache GenericRdata, to avoid extra module loads the
next time.
'ANY', rdtype_text]))
cls = getattr(mod, rdtype_text)
_rdata_classes[(dns.rdataclass.ANY, rdtype)] = cls
+ _rdata_classes[(rdclass, rdtype)] = cls
except ImportError:
pass
if not cls:
cls = GenericRdata
+ _rdata_classes[(rdclass, rdtype)] = cls
return cls