From 08d442bddce168849e5e71f62430b369a8c3c474 Mon Sep 17 00:00:00 2001 From: Chris Tihor Date: Tue, 5 Nov 2024 10:57:58 -0500 Subject: [PATCH] EMBCESSMOD-5665 Responder Portal - Jurisdiction not visible in portal Updated to change cache lifetime for the community list to be 1 hour. --- ess/src/API/EMBC.ESS/Resources/Metadata/MetadataRepository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ess/src/API/EMBC.ESS/Resources/Metadata/MetadataRepository.cs b/ess/src/API/EMBC.ESS/Resources/Metadata/MetadataRepository.cs index a42cb2e4f..064d46cb9 100644 --- a/ess/src/API/EMBC.ESS/Resources/Metadata/MetadataRepository.cs +++ b/ess/src/API/EMBC.ESS/Resources/Metadata/MetadataRepository.cs @@ -17,6 +17,7 @@ public class MetadataRepository : IMetadataRepository internal const string PlannedOutagesCacheKey = "metadata:plannedoutages"; internal static readonly TimeSpan CacheEntryLifetime = TimeSpan.FromDays(1); + internal static readonly TimeSpan CommunitiesCacheEntryLifetime = TimeSpan.FromHours(1); private readonly InternalMetadataRepository internalRepository; private readonly ICache cache; @@ -39,7 +40,7 @@ public async Task> GetStateProvinces() public async Task> GetCommunities() { - return await cache.GetOrSet(CommunitiesCacheKey, internalRepository.GetCommunities, CacheEntryLifetime); + return await cache.GetOrSet(CommunitiesCacheKey, internalRepository.GetCommunities, CommunitiesCacheEntryLifetime); } public async Task GetSecurityQuestions()