
On 6/28/25 22:55, Mark Sapiro wrote:
This is a different issue. See https://gitlab.com/mailman/mailman/-/issues/1231
Both this and https://gitlab.com/mailman/mailman/-/issues/1230 are fixed by https://gitlab.com/mailman/mailman/-/merge_requests/1368 and https://gitlab.com/mailman/mailman/-/merge_requests/1367 respectively. The fixes will be in Mailman 3.3.11. This patch ``` --- a/src/mailman/model/cache.py +++ b/src/mailman/model/cache.py @@ -27,7 +27,7 @@ from mailman.database.model import Model from mailman.database.transaction import dbconnection from mailman.database.types import SAUnicode from mailman.interfaces.cache import ICacheManager -from mailman.utilities.datetime import now +from mailman.utilities.datetime import now, ZERO from mailman.utilities.filesystem import safe_remove from public import public from sqlalchemy import Boolean, Column, DateTime, Integer @@ -104,6 +104,8 @@ class CacheManager: """See `ICacheManager`.""" if lifetime is None: lifetime = as_timedelta(config.mailman.cache_life) + if lifetime == ZERO: + return None is_bytes = isinstance(contents, bytes) file_id = self._key_to_file_id(key) # Is there already an unexpired entry under this id in the database? @@ -124,7 +126,7 @@ class CacheManager: """See `ICacheManager`.""" entry = store.query(CacheEntry).filter( CacheEntry.key == key).one_or_none() - if entry is None: + if entry is None or entry.expires_on <= now(): return None file_path, dir_path = self._id_to_path(entry.file_id) with ExitStack() as resources: ``` implements both fixes. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan