Skip to content

Cache eviction is too aggressive which results in records being called back that have not changed #1013

@bdraco

Description

@bdraco

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions