[WIP] `Session::enablePeristentFlash` feature

Fix for #3956