def set_pref(key, value)
      prefs unless @prefs_fetched  # update cache first
      success = _set_pref(key, value)
      @prefs_cache[key] = value if success
      success
    end
def set_pref(key, value)
      prefs unless @prefs_fetched  # update cache first
      success = _set_pref(key, value)
      @prefs_cache[key] = value if success
      success
    end
set a preference key/value pair, and update the cache.
 @param key [String] the preference key
 @param value [String] the preference value
 @return [bool] whether the command succeeded