mirror of https://github.com/pixelfed/pixelfed
Clear place status caches after save to close invalidation race
handleImmediateAttributes cleared the old and new per-place status-id caches while place_id was only mutated in memory, before $status->save() committed the change. A concurrent PlaceController::show read landing in that window re-warmed the old place cache from the pre-move DB state, pinning a stale membership list for the 4-day TTL. Move both PlaceService::clearStatusesByPlaceId calls to after save() so the cache can only be re-warmed from post-move DB state. Add a regression test that re-warms the old place cache during the updating event (fired inside save, before the DB write) and asserts it does not survive.pull/7553/head
parent
641d7005bf
commit
c32642e686
Loading…
Reference in New Issue