pub fn set_prefs(scope_id: &str, next: ScopePrefs) -> Result<(), String>
Write a scope through to the database and the cache.