Open
Description
In almost all (if not all) cases, I am not writing and directly reading a preference.
Therefore, I should be able to extend the cached preference to do the following:
- Asynchronously get all prefs when initially loaded
- Fall back to synchronous get when no cache hit (ex. before it is loaded / reloaded)
- On preference change, invalidate the cache for that pref + asynchronously reload the preference into cache
If the preference load is done on startup, in the background this should mean that most preference loads are cache hits.
- Update CachedPreferences to preload all preferences (preload flag)
- Update CachedPreferences to reload preference after it's changed
- Verify performance improvement
- Move GPS/steps cache to separate shared prefs