From 609ace68460c2c4932d7074decae8871173544f3 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 9 Oct 2017 14:43:33 -0400 Subject: [PATCH] mappedDomain is cache key --- src/Icons/Controllers/IconsController.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Icons/Controllers/IconsController.cs b/src/Icons/Controllers/IconsController.cs index b4d695c29e..f86d2f2e9c 100644 --- a/src/Icons/Controllers/IconsController.cs +++ b/src/Icons/Controllers/IconsController.cs @@ -46,8 +46,7 @@ namespace Bit.Icons.Controllers } var mappedDomain = _domainMappingService.MapDomain(uri.Host); - var cacheKey = $"{mappedDomain}"; - var icon = await _memoryCache.GetOrCreateAsync(cacheKey, async entry => + var icon = await _memoryCache.GetOrCreateAsync(mappedDomain, async entry => { entry.AbsoluteExpiration = DateTime.UtcNow.AddHours(_iconsSettings.CacheHours);