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();