Skip to main content

invalidate_caches

Function invalidate_caches 

Source
pub fn invalidate_caches()
Expand description

Reset all process-wide caches so the next call to system_is_dark(), prefers_reduced_motion(), or system_icon_theme() re-queries the OS.

Call this when you detect that the user has changed system settings (e.g., dark mode toggle, icon theme switch, accessibility preferences).

The detect_*() family of functions are unaffected — they always query the OS directly.