domainaware / checkdmarc

A parser for SPF and DMARC DNS records
https://domainaware.github.io/checkdmarc
Apache License 2.0
245 stars 76 forks source link

Cache doesn't work in _query_dns #79

Closed jlaundry closed 1 year ago

jlaundry commented 1 year ago

Currently, _query_dns uses the following logic to see if a cache should be used:

https://github.com/domainaware/checkdmarc/blob/7cc07dbe324f57dceed49e056095bb4cffbb9b5d/checkdmarc.py#L637-L640

However, if cache doesn't return True if cache is an ExpiringDict, so the cache is never used.