Since A/SRV records typically expire in 120s, we evict them from the cache almost as soon as they expire.
In practice some devices that care about these records frequently won't refresh them until they have seen them for 120s event if they expire before than. We should keep them for 2X the ttl in the cache so we know not to callback updates when they haven't actually changed. This results in floods of callbacks as records are refreshed with no real actual changes.
python-zeroconf is actually guilty of this as well because we have the problem where we use stale records from the cache in add_question_or_all_cache and add_question_or_one_cache so they don't get refreshed
We already have checks to not send them out or use them otherwise with the record.is_expired guards.
Since A/SRV records typically expire in 120s, we evict them from the cache almost as soon as they expire.
In practice some devices that care about these records frequently won't refresh them until they have seen them for 120s event if they expire before than. We should keep them for 2X the ttl in the cache so we know not to callback updates when they haven't actually changed. This results in floods of callbacks as records are refreshed with no real actual changes.
python-zeroconfis actually guilty of this as well because we have the problem where we use stale records from the cache inadd_question_or_all_cacheandadd_question_or_one_cacheso they don't get refreshedWe already have checks to not send them out or use them otherwise with the
record.is_expiredguards.