コード例 #1
0
 private async Task ResetRemoteCache()
 {
     foreach (string instance in config.SiblingEndPoints)
     {
         try {
             using var client = clientFactory.CreateClient(CachingClient.CachingProxyName);
             var proxy = new CachingClient(logger, client);
             await proxy.Reset();
         }catch (Exception err) {
             logger.LogError(err, "Error resetting caching for instance {name}", instance);
         }
     }
 }
コード例 #2
0
 private async Task EnvictRemoteCache(IEnumerable <object> keys)
 {
     foreach (string instance in config.SiblingEndPoints)
     {
         try {
             using var client = clientFactory.CreateClient(CachingClient.CachingProxyName);
             var proxy = new CachingClient(logger, client);
             await proxy.Envict(keys);
         } catch (Exception err) {
             logger.LogError(err, "Error envicting caching for instance {name}", instance);
         }
     }
 }