fix: ensure cache does not return stale created and ttl values by bdraco · Pull Request #1469 · python-zeroconf/python-zeroconf

added 2 commits

January 8, 2025 11:04
This PR corrects a severe flaw in the cache design

The cache could return old stale records when the record
was replaced in the underlying dict since the key is not
updated.

The following functions where affected:

async_entries_with_name
async_entries_with_server
entries_with_name
entries_with_server

@bdraco bdraco changed the title fix: ensure cache always returns the values and not keys fix: ensure cache does not return stale values

Jan 8, 2025

@bdraco

@bdraco

@bdraco bdraco changed the title fix: ensure cache does not return stale values fix: ensure cache does not return stale created and ttl values

Jan 8, 2025

@bdraco bdraco marked this pull request as ready for review

January 8, 2025 21:42

bdraco added a commit to home-assistant/core that referenced this pull request

Jan 8, 2025

@bdraco