Fix bug where `StreamChangeCache` would not respect cache factors (#17152)

Annoyingly mypy didn't pick up this typo.
This commit is contained in:
Erik Johnston 2024-05-03 18:00:08 +01:00 committed by GitHub
parent 3818597751
commit 7c9ac01eb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

1
changelog.d/17152.bugfix Normal file
View File

@ -0,0 +1 @@
Fix bug where `StreamChangeCache` would not respect configured cache factors.

View File

@ -115,7 +115,7 @@ class StreamChangeCache:
"""
new_size = math.floor(self._original_max_size * factor)
if new_size != self._max_size:
self.max_size = new_size
self._max_size = new_size
self._evict()
return True
return False