public async Task <string> GetAsync(string scope, string application, string section, string key)
        {
            var cacheKey = KeyMaker.ConstructKey(scope, application, section, key);
            var result   = LocalConfigurationRepository.IsKeyPresent(cacheKey)
                            ? await GetFromLocalAsync(cacheKey)
                            : await GetFromRemoteAsync(scope, application, section, key);

            return(result);
        }
Exemple #2
0
        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);
     }
 }