From 5db5ca1c88cf6592ceb4304d3b0682394050bbc8 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 29 Dec 2018 15:53:11 -0500 Subject: reduce cache time for mod compatibility list --- src/SMAPI.Web/Controllers/ModsController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/SMAPI.Web/Controllers/ModsController.cs') diff --git a/src/SMAPI.Web/Controllers/ModsController.cs b/src/SMAPI.Web/Controllers/ModsController.cs index 1ac0aff2..ca866a8d 100644 --- a/src/SMAPI.Web/Controllers/ModsController.cs +++ b/src/SMAPI.Web/Controllers/ModsController.cs @@ -22,7 +22,7 @@ namespace StardewModdingAPI.Web.Controllers private readonly IMemoryCache Cache; /// The number of minutes successful update checks should be cached before refetching them. - private readonly int SuccessCacheMinutes; + private readonly int CacheMinutes; /********* @@ -31,12 +31,12 @@ namespace StardewModdingAPI.Web.Controllers /// Construct an instance. /// The cache in which to store mod metadata. /// The config settings for mod update checks. - public ModsController(IMemoryCache cache, IOptions configProvider) + public ModsController(IMemoryCache cache, IOptions configProvider) { - ModUpdateCheckConfig config = configProvider.Value; + ModCompatibilityListConfig config = configProvider.Value; this.Cache = cache; - this.SuccessCacheMinutes = config.SuccessCacheMinutes; + this.CacheMinutes = config.CacheMinutes; } /// Display information for all mods. @@ -66,7 +66,7 @@ namespace StardewModdingAPI.Web.Controllers .OrderBy(p => Regex.Replace(p.Name.ToLower(), "[^a-z0-9]", "")) // ignore case, spaces, and special characters when sorting ); - entry.AbsoluteExpiration = DateTimeOffset.UtcNow.AddMinutes(this.SuccessCacheMinutes); + entry.AbsoluteExpiration = DateTimeOffset.UtcNow.AddMinutes(this.CacheMinutes); return model; }); } -- cgit