From 307251cfd1f7b920e40caaaea679b2a484d9d0ba Mon Sep 17 00:00:00 2001 From: Arne Dumarey Date: Tue, 12 Sep 2023 11:49:49 +0200 Subject: [PATCH] feat: don't cache legacy GAWR-5195 --- .../LastChangedListProjections.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/PostalRegistry.Projections.LastChangedList/LastChangedListProjections.cs b/src/PostalRegistry.Projections.LastChangedList/LastChangedListProjections.cs index a7488c3c..5b40def0 100644 --- a/src/PostalRegistry.Projections.LastChangedList/LastChangedListProjections.cs +++ b/src/PostalRegistry.Projections.LastChangedList/LastChangedListProjections.cs @@ -14,7 +14,7 @@ namespace PostalRegistry.Projections.LastChangedList public class LastChangedListProjections : LastChangedListConnectedProjection { - private static readonly AcceptType[] SupportedAcceptTypes = { AcceptType.Json, AcceptType.Xml, AcceptType.JsonLd }; + private static readonly AcceptType[] SupportedAcceptTypes = { AcceptType.JsonLd }; public LastChangedListProjections() : base(SupportedAcceptTypes) @@ -54,8 +54,6 @@ protected override string BuildCacheKey(AcceptType acceptType, string identifier var shortenedAcceptType = acceptType.ToString().ToLowerInvariant(); return acceptType switch { - AcceptType.Json => $"legacy/postalinfo:{{0}}.{shortenedAcceptType}", - AcceptType.Xml => $"legacy/postalinfo:{{0}}.{shortenedAcceptType}", AcceptType.JsonLd => $"oslo/postalinfo:{{0}}.{shortenedAcceptType}", _ => throw new NotImplementedException($"Cannot build CacheKey for type {typeof(AcceptType)}") }; @@ -65,8 +63,6 @@ protected override string BuildUri(AcceptType acceptType, string identifier) { return acceptType switch { - AcceptType.Json => "/v1/postcodes/{0}", - AcceptType.Xml => "/v1/postcodes/{0}", AcceptType.JsonLd => "/v2/postcodes/{0}", _ => throw new NotImplementedException($"Cannot build Uri for type {typeof(AcceptType)}") };