Add CacheController and caching support for signatures
Introduced a new `CacheController` to manage cached data for receiver signatures using distributed caching. Added endpoints to save, retrieve, and delete cached signatures. Created a `SignatureCacheRequest` model for caching payloads and a `CacheOptions` class to configure cache settings, including optional expiration. Updated `Program.cs` to bind `CacheOptions` to the `Cache` section in `appsettings.json`. Added a new `Cache` section in `appsettings.json` with a `SignatureCacheExpiration` property, defaulting to `null` (no expiration).
This commit is contained in:
@@ -17,6 +17,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using DigitalData.Core.Abstractions.Security.Extensions;
|
||||
using EnvelopeGenerator.API.Middleware;
|
||||
using EnvelopeGenerator.API.Options;
|
||||
using NLog.Web;
|
||||
using NLog;
|
||||
using DigitalData.Auth.Claims;
|
||||
@@ -265,6 +266,9 @@ try
|
||||
// Localizer
|
||||
builder.Services.AddCookieBasedLocalizer();
|
||||
|
||||
// Cache options
|
||||
builder.Services.Configure<CacheOptions>(config.GetSection(CacheOptions.SectionName));
|
||||
|
||||
// Envelope generator serives
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
builder.Services
|
||||
|
||||
Reference in New Issue
Block a user