Factorize code to use new settings store api (which is purely async).