Skip to main content

clear_id_caches

Function clear_id_caches 

Source
pub fn clear_id_caches()
Expand description

Clear every id cache on account switch. Row ids are PER-ACCOUNT (each account has its own DB + id sequence), so a stale entry after a swap points into the wrong DB: writes FK-fail silently and reads hit the wrong row. The caches live in id_cache; this is the public entry the swap path + callers already use.