mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-29 17:52:50 +08:00

* hacked together load balancing reroutes in fileconfig * some renaming and refactoring * more renames * hacked away the old config json * test for issue 213 * renamed key * dont share ports * oops * updated docs * mvoed docs around * port being used
29 lines
928 B
C#
29 lines
928 B
C#
using CacheManager.Core;
|
|
using Microsoft.AspNetCore.Hosting;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using Ocelot.DependencyInjection;
|
|
using Ocelot.AcceptanceTests.Caching;
|
|
|
|
namespace Ocelot.AcceptanceTests
|
|
{
|
|
public class StartupWithCustomCacheHandle : AcceptanceTestsStartup
|
|
{
|
|
public StartupWithCustomCacheHandle(IHostingEnvironment env) : base(env) { }
|
|
|
|
public override void ConfigureServices(IServiceCollection services)
|
|
{
|
|
services.AddOcelot(Configuration)
|
|
.AddCacheManager((x) =>
|
|
{
|
|
x.WithMicrosoftLogging(log =>
|
|
{
|
|
log.AddConsole(LogLevel.Debug);
|
|
})
|
|
.WithJsonSerializer()
|
|
.WithHandle(typeof(InMemoryJsonHandle<>));
|
|
});
|
|
}
|
|
}
|
|
}
|