Explorar el Código

Expire product catalog cache entries after 10 minutes.

Andrew Klopper hace 7 años
padre
commit
a0e7519c3f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      BulkPrintingAPI/Controllers/Utils.cs

+ 1 - 1
BulkPrintingAPI/Controllers/Utils.cs

@@ -287,7 +287,7 @@ namespace BulkPrintingAPI.Controllers
287 287
             }
288 288
             return await cache.GetOrCreateAsync(key, entry =>
289 289
                 {
290
-                    // TODO: set expiry time, etc.
290
+                    entry.AbsoluteExpirationRelativeToNow = new TimeSpan(0, 10, 0);
291 291
                     return MAX.Utils.GetProductCatalogueAsync(clientFactory, logger, credentials);
292 292
                 }).ConfigureAwait(false);
293 293
         }