Compare commits

...

3 Commits

Author SHA1 Message Date
Jeff Leung af492dedff Update bump the batch size to 50 at a time 2024-01-04 23:19:51 -08:00
Jeff Leung c5bb3843aa Update sliding window cache timers 2024-01-04 23:19:01 -08:00
Jeff Leung 6c7a007f96 Rename file 2024-01-04 23:18:50 -08:00
3 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ namespace AS1024.GeoFeed.Controllers
{
feed = await builder.GetGeoFeedData();
var cacheEntryOptions = new MemoryCacheEntryOptions()
.SetAbsoluteExpiration(TimeSpan.FromHours(1));
.SetSlidingExpiration(TimeSpan.FromMinutes(15));
memoryCache.Set(GeoFeedCacheKey, feed, cacheEntryOptions);
}

View File

@ -93,7 +93,7 @@ namespace AS1024.GeoFeed.GeoFeedBuilder
{
var queryParameters = HttpUtility.ParseQueryString(string.Empty);
queryParameters["cf_geoloc_has_location"] = "true";
queryParameters["limit"] = "5";
queryParameters["limit"] = "50";
switch (family)
{

View File

@ -24,7 +24,7 @@ namespace AS1024.GeoFeed.GeoFeedBuilder
{
logger.LogInformation("Preloading GeoFeed data in memory...");
var feed = await provider.GetGeoFeedData();
var cacheEntryOptions = new MemoryCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromHours(1));
var cacheEntryOptions = new MemoryCacheEntryOptions().SetAbsoluteExpiration(TimeSpan.FromMinutes(45));
memoryCache.Set(GeoFeedCacheKey, feed, cacheEntryOptions);
}