@@ -100,7 +100,7 @@ public void Init(ProjectId projectId, PinnedVersions pinnedVersions) => Executor
100100
101101 _logger . LogInformation ( "Refreshing version cache for {project} every {timePeriod} minutes." ,
102102 ProjectName , _refreshTimer . Period . TotalMinutes ) ;
103-
103+
104104 while ( await _refreshTimer . WaitForNextTickAsync ( ) )
105105 {
106106 await RefreshAsync ( ) ;
@@ -116,7 +116,8 @@ public void Init(ProjectId projectId, PinnedVersions pinnedVersions) => Executor
116116 if ( ! HasProjectInfo )
117117 return null ;
118118
119- if ( PinnedVersions . Find ( platform , arch ) is { } pinnedVersion && TryGetValue ( pinnedVersion , out var pinnedLatest ) )
119+ if ( PinnedVersions . Find ( platform , arch ) is { } pinnedVersion &&
120+ TryGetValue ( pinnedVersion , out var pinnedLatest ) )
120121 return pinnedLatest ;
121122
122123 return Latest ;
@@ -160,7 +161,7 @@ public async Task RefreshAsync()
160161 {
161162 Tag = release . TagName ,
162163 ReleaseUrl = ReleaseUrlFormat . Format ( release . TagName ) ,
163- Downloads = new DownloadLinks
164+ Downloads = new DownloadLinks
164165 {
165166 Windows = new DownloadLinks . SupportedPlatform
166167 {
@@ -239,25 +240,34 @@ public static void InitializeVersionCaches(WebApplication app)
239240 var pvLogger = app . Services . Get < ILoggerFactory > ( ) . CreateLogger < PinnedVersions > ( ) ;
240241
241242 var stableCache = app . Services . GetRequiredKeyedService < VersionCache > ( "stableCache" ) ;
242- stableCache . Init ( stableSource ,
243+ stableCache . Init ( stableSource ,
243244 new PinnedVersions ( pvLogger , vpSection . GetSection ( "Stable" ) ) ) ;
244245
245246 var canarySource = versionCacheSection . GetValue < string > ( "Canary" ) ;
246247
247248 if ( canarySource != null )
248249 {
249250 var canaryCache = app . Services . GetRequiredKeyedService < VersionCache > ( "canaryCache" ) ;
250- canaryCache . Init ( canarySource ,
251+ canaryCache . Init ( canarySource ,
251252 new PinnedVersions ( pvLogger , vpSection . GetSection ( "Canary" ) ) ) ;
252253 }
253-
254+
254255 var custom1Source = versionCacheSection . GetValue < string > ( "Custom1" ) ;
255256
256257 if ( custom1Source != null )
257258 {
258259 var canaryCache = app . Services . GetRequiredKeyedService < VersionCache > ( "custom1Cache" ) ;
259- canaryCache . Init ( custom1Source ,
260+ canaryCache . Init ( custom1Source ,
260261 new PinnedVersions ( pvLogger , vpSection . GetSection ( "Custom1" ) ) ) ;
261262 }
263+
264+ var kenjiNxSource = versionCacheSection . GetValue < string > ( "KenjiNX" ) ;
265+
266+ if ( kenjiNxSource != null )
267+ {
268+ var kenjiCache = app . Services . GetRequiredKeyedService < VersionCache > ( "kenjinxCache" ) ;
269+ kenjiCache . Init ( custom1Source ,
270+ new PinnedVersions ( pvLogger , vpSection . GetSection ( "KenjiNX" ) ) ) ;
271+ }
262272 }
263273}
0 commit comments