mais otimizações 3.0

This commit is contained in:
2025-06-18 22:17:06 -03:00
parent fd9e4324dd
commit afd6f0298c
5 changed files with 149 additions and 3 deletions

View File

@@ -53,8 +53,7 @@ namespace OpenCand.API
app.Run();
}
private static void SetupServices(WebApplicationBuilder builder)
private static void SetupServices(WebApplicationBuilder builder)
{
builder.Services.Configure<FotosSettings>(builder.Configuration.GetSection("FotosSettings"));
builder.Services.AddMemoryCache();
@@ -67,6 +66,9 @@ namespace OpenCand.API
builder.Services.AddScoped<OpenCandService>();
builder.Services.AddScoped<EstatisticaService>();
// Add cache preload background service
builder.Services.AddHostedService<CachePreloadService>();
}
}
}