Added session caching for user validation to reduce db calls and introduced configurable session options.

This commit is contained in:
2026-01-16 09:19:15 +01:00
parent 10cd0f0b09
commit bee381702b
3 changed files with 50 additions and 9 deletions

View File

@@ -29,6 +29,9 @@ public partial class Startup
builder.Services.AddSingleton<DiagnoseService>();
builder.Services.AddSingleton<IDiagnoseProvider, UpdateDiagnoseProvider>();
builder.Services.AddMemoryCache();
builder.Services.AddOptions<SessionOptions>().BindConfiguration("Moonlight:Session");
}
private static void UseBase(WebApplication application)