A better solution is to switch to MMKV from Tencent, the same key-value storage used in WeChat and many production apps.
MMKV is:
Based on mmap, so it reads/writes data directly to memory-mapped files
Multi-process safe, meaning changes are immediately visible across processes
You can sync with existing sharedpref.