Fix preloading issues
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user