Implemented caching on all get endpoints and service layer

This commit is contained in:
2026-09-05 08:26:15 +02:00
parent 6719699689
commit 0a1378fe25
61 changed files with 1185 additions and 255 deletions
@@ -1,3 +1,4 @@
using PostFundManagement.Application.Abstractions.Services;
using PostFundManagement.Application.Extensions;
using PostFundManagement.Application.Services.Governance;
using PostFundManagement.Domain.Abstractions;
@@ -12,7 +13,7 @@ public class DashboardEndpoint : IEndpoint
{
public void Map(IEndpointRouteBuilder builder)
{
builder.MapGet("api/governance/dashboard", async (GovernanceService service,
builder.MapGet("api/governance/dashboard", async (IGovernanceService service,
CancellationToken cancellationToken = default) =>
await service.GetDashboardAsync(cancellationToken) switch
{
@@ -25,6 +26,7 @@ public class DashboardEndpoint : IEndpoint
.Produces<Dashboard>(StatusCodes.Status200OK)
.Produces(StatusCodes.Status401Unauthorized)
.Produces<Problems>(StatusCodes.Status500InternalServerError)
.WithTags(EndpointTags.Governance);
.WithTags(EndpointTags.Governance)
.CacheOutput();
}
}