public string Get(string scope, string application, string section, string key) { var cacheKey = KeyMaker.ConstructKey(scope, application, section, key); var result = LocalConfigurationRepository.IsKeyPresent(cacheKey) ? LocalConfigurationRepository.Get(cacheKey) : GetFromRemote(scope, application, section, key); return(result); }
public string Get(string scope, string application, string section, string key) { using (new ProfileContext("CachedConfigurationStore.Get")) { var cacheKey = KeyMaker.ConstructKey(scope, application, section, key); Profiling.Trace($"Key: {key}"); var result = LocalConfigurationRepository.IsKeyPresent(cacheKey) ? LocalConfigurationRepository.Get(cacheKey) : GetFromRemote(scope, application, section, key); return(result); } }
private Task <string> GetFromLocalAsync(string key) { string value = LocalConfigurationRepository.Get(key); return(Task.FromResult <string>(value)); }