예제 #1
0
 private void InitializeCache(string nodeKey)
 {
     DependencyRegistrar.RegisterSingletonComponent <IQueueHubClient>(new QueueHubClient(ConfigurationManager.AppSettings["QueueService_Endpoint"]));
     DependencyRegistrar.RegisterSingletonComponent <IThrottleCache>(new ThrottleCache());
     Task.WaitAll(new[]
     {
         Task.Run(async() => DependencyRegistrar.RegisterSingletonComponent <IGameCache>(await GameCache.BuildCache(nodeKey))),
         Task.Run(async() => DependencyRegistrar.RegisterSingletonComponent <IPixelCache>(await PixelCache.BuildCache(nodeKey))),
     }, TimeSpan.FromMinutes(10));
 }