From f60bb799206c38953fc40f6fb98ded9f85d7c561 Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 8 Aug 2025 13:53:29 +0200 Subject: [PATCH] feat(Ocelot.Cache.CacheManager): add and configure --- DigitalData.Gateway.csproj | 5 +++-- Program.cs | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/DigitalData.Gateway.csproj b/DigitalData.Gateway.csproj index 7283c86..b3f6756 100644 --- a/DigitalData.Gateway.csproj +++ b/DigitalData.Gateway.csproj @@ -1,4 +1,4 @@ - + net7.0 @@ -13,7 +13,8 @@ - + + diff --git a/Program.cs b/Program.cs index 391d106..7bccae8 100644 --- a/Program.cs +++ b/Program.cs @@ -2,6 +2,7 @@ using NLog; using NLog.Web; using Ocelot.DependencyInjection; using Ocelot.Middleware; +using Ocelot.Cache.CacheManager; var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger(); logger.Info("Logging initialized."); @@ -23,7 +24,9 @@ try builder.Configuration.AddJsonFile($"ocelot{suffix}.json"); // Add Ocelot services - builder.Services.AddOcelot(); + builder.Services + .AddOcelot() + .AddCacheManager(x => x.WithDictionaryHandle()); var app = builder.Build();