From edd3c0467cb93f76ec0bdedec40e33125c331c19 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 13 Jun 2026 05:42:50 +0100 Subject: [PATCH] Contain legacy catalog readbacks --- Assets/Scripts/ServerShared/CultCache/CultCache.cs | 10 +++++++--- docs/aetheria-perfect-machine-map.md | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/ServerShared/CultCache/CultCache.cs b/Assets/Scripts/ServerShared/CultCache/CultCache.cs index f15a2eac1..da264e5a6 100644 --- a/Assets/Scripts/ServerShared/CultCache/CultCache.cs +++ b/Assets/Scripts/ServerShared/CultCache/CultCache.cs @@ -122,11 +122,15 @@ public class CultCache } if(_typeStores.ContainsKey(type)) - _typeStores[type].Push(entry); + { + var typeStore = _typeStores[type]; + if(typeStore != source) + typeStore.Push(entry); + } else { - var masterStore = _backingStores.First(); - if(masterStore!=source) + var masterStore = _backingStores.FirstOrDefault(); + if(masterStore != null && masterStore!=source) masterStore.Push(entry); } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index e82d8faf6..1c381c7e6 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -189,6 +189,8 @@ First Aetheria surfaces to publish: - Done: disable legacy local save, loadout, zone, player-settings, keyboard layout, DB inspector, and NameFile export writers. - Done: delete the old `SavedGame`/`SavedZone` runtime save DTO and loader. + - Done: stop legacy `CultCache` pull/read paths from writing entries back to + their source backing store. - Remaining: delete or quarantine old cache abstractions that no longer protect an invariant once catalog migration has a typed reader.