Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: don't cache legacy GAWR-5195 #316

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace StreetNameRegistry.Projections.LastChangedList
[ConnectedProjectionDescription("Projectie die markeert voor hoeveel straatnamen de gecachte data nog geüpdated moeten worden.")]
public sealed class LastChangedProjections : LastChangedListConnectedProjection
{
private static readonly AcceptType[] SupportedAcceptTypes = { AcceptType.Json, AcceptType.Xml, AcceptType.JsonLd };
private static readonly AcceptType[] SupportedAcceptTypes = { AcceptType.JsonLd };

public LastChangedProjections()
: base(SupportedAcceptTypes)
Expand Down Expand Up @@ -243,8 +243,6 @@ protected override string BuildCacheKey(AcceptType acceptType, string identifier
var shortenedAcceptType = acceptType.ToString().ToLowerInvariant();
return acceptType switch
{
AcceptType.Json => $"legacy/streetname:{{0}}.{shortenedAcceptType}",
AcceptType.Xml => $"legacy/streetname:{{0}}.{shortenedAcceptType}",
AcceptType.JsonLd => $"oslo/streetname:{{0}}.{shortenedAcceptType}",
_ => throw new NotImplementedException($"Cannot build CacheKey for type {typeof(AcceptType)}")
};
Expand All @@ -254,8 +252,6 @@ protected override string BuildUri(AcceptType acceptType, string identifier)
{
return acceptType switch
{
AcceptType.Json => "/v1/straatnamen/{0}",
AcceptType.Xml => "/v1/straatnamen/{0}",
AcceptType.JsonLd => "/v2/straatnamen/{0}",
_ => throw new NotImplementedException($"Cannot build Uri for type {typeof(AcceptType)}")
};
Expand Down
Loading