Fix preloading issues
This commit is contained in:
parent
7c952c134a
commit
2d95fcb1a1
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue