Fix preloading issues

This commit is contained in:
Jeff Leung 2024-01-16 23:45:33 -08:00
parent 7c952c134a
commit 2d95fcb1a1
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ namespace AS1024.GeoFeed.MinimalAPI
bool isCached = true;
try
{
if (!memoryCache.TryGetValue("Geofeed", out List<IPGeoFeed>? feed))
if (!memoryCache.TryGetValue("GeoFeedData", out List<IPGeoFeed>? feed))
{
isCached = false;
feed = await provider.GetGeoFeedData();
@ -62,7 +62,7 @@ namespace AS1024.GeoFeed.MinimalAPI
{
MemoryCacheEntryOptions cacheEntryOptions = new MemoryCacheEntryOptions()
.SetSlidingExpiration(TimeSpan.FromMinutes(15));
memoryCache.Set("Geofeed", feed, cacheEntryOptions);
memoryCache.Set("GeoFeedData", feed, cacheEntryOptions);
}
}