Spend the deferred purge when its load is discarded

The flag stayed set on the path that rejects a stale disk load, where no
later load will ever consult it. Nothing stale survives either way — the
purge that invalidated the load did the work itself — but a flag left
raised is a question for the next reader.
This commit is contained in:
Arkadiusz Fal
2026-08-29 19:10:48 +02:00
parent 360b1ec0cb
commit 5dd4bcb48b

View File

@@ -77,6 +77,9 @@ final class HomeInstanceCache {
// finds nothing to drop and this would quietly reinstate the
// previous login's private feeds.
guard generation == accountGeneration else {
// Whatever asked for the purge has already done it — this is
// the only load there will be, so the request is spent too.
pendingFeedPurge = false
LoggingService.shared.info(
"Discarding a disk cache that belongs to the previous login",
category: .general