mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-08-05 01:32:26 +08:00
Fix/issue666 (#889)
* cache key now can generate from query string for request with Get Methods and request content for requests with post methods * MD5Helper Added. OutputCacheMiddleware now can generate cache key using method, url and content * unit test created for CacheKeyGenerator * CacheKeyGenerator Registered in OcelotBuilder as singletone
This commit is contained in:
@ -33,6 +33,10 @@
|
||||
builder.Services.RemoveAll(typeof(IOcelotCache<FileConfiguration>));
|
||||
builder.Services.AddSingleton<ICacheManager<FileConfiguration>>(fileConfigCacheManagerOutputCache);
|
||||
builder.Services.AddSingleton<IOcelotCache<FileConfiguration>>(fileConfigCacheManager);
|
||||
|
||||
builder.Services.RemoveAll(typeof(ICacheKeyGenerator));
|
||||
builder.Services.AddSingleton<ICacheKeyGenerator, CacheKeyGenerator>();
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user