When I use the MinExpirationPickableCache as
cache = dns_cache.MinExpirationPickableCache(filename="dns.pickle", min_ttl=1000)
dns_cache.override_system_resolver(cache=cache)
it works, but when script is finished it shows the following error:
Exception ignored in: <function SelfPickle.__del__ at 0x7f2c37dda710>
Traceback (most recent call last):
File "/home/kem/virtual/dns_test/lib/python3.10/site-packages/dns_cache/pickle.py", line 28, in __del__
NameError: name 'open' is not defined