mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-07-03 16:38:16 +08:00
working on region clearing cache, if using cachemanager back plance this would clear all servers in cluster
This commit is contained in:
@ -63,7 +63,9 @@ namespace Ocelot.Cache.Middleware
|
||||
|
||||
var response = HttpResponseMessage;
|
||||
|
||||
_outputCache.Add(downstreamUrlKey, response, TimeSpan.FromSeconds(DownstreamRoute.ReRoute.FileCacheOptions.TtlSeconds));
|
||||
var region = $"{DownstreamRoute.ReRoute.UpstreamHttpMethod}-{DownstreamRoute.ReRoute.UpstreamPathTemplate.Value}";
|
||||
|
||||
_outputCache.Add(downstreamUrlKey, response, TimeSpan.FromSeconds(DownstreamRoute.ReRoute.FileCacheOptions.TtlSeconds), region);
|
||||
|
||||
_logger.LogDebug("finished response added to cache for {downstreamUrlKey}", downstreamUrlKey);
|
||||
}
|
||||
|
Reference in New Issue
Block a user