In my current Android app I have several settings stored in SharedPreferences and one object which handles access to them. I now wonder if it makes sense to cache the values or if doesn't mater much accessing them like:
public final boolean isxxxEnabled() {
return preferences.getBoolean("xxx", false);
}
instead of
public final boolean isxxxEnabled() {
// check if value changed
// if not, check if value is cached
// decide whether to return cached or new
// cache value
return
}