diff --git a/linkerd/app/core/src/svc.rs b/linkerd/app/core/src/svc.rs index e99365301e..f444b176c6 100644 --- a/linkerd/app/core/src/svc.rs +++ b/linkerd/app/core/src/svc.rs @@ -222,7 +222,7 @@ impl Stack { self.push_on_service(buffer(name, config)) } - pub fn push_cache(self, idle: Duration) -> Stack> + pub fn push_idle_cache(self, idle: Duration) -> Stack> where T: Clone + Eq + std::fmt::Debug + std::hash::Hash + Send + Sync + 'static, S: NewService + 'static, diff --git a/linkerd/app/gateway/src/lib.rs b/linkerd/app/gateway/src/lib.rs index ac44d27dd3..9d75cb5210 100644 --- a/linkerd/app/gateway/src/lib.rs +++ b/linkerd/app/gateway/src/lib.rs @@ -154,7 +154,7 @@ where ) .push_buffer("TCP Gateway", &outbound.config().tcp_connection_buffer), ) - .push_cache(outbound.config().discovery_idle_timeout) + .push_idle_cache(outbound.config().discovery_idle_timeout) .check_new_service::(); // Cache an HTTP gateway service for each destination and HTTP version. @@ -188,7 +188,7 @@ where ) .push_buffer("Gateway", &inbound_config.http_request_buffer), ) - .push_cache(inbound_config.discovery_idle_timeout) + .push_idle_cache(inbound_config.discovery_idle_timeout) .push_on_service( svc::layers() .push(http::Retain::layer()) diff --git a/linkerd/app/inbound/src/http/router.rs b/linkerd/app/inbound/src/http/router.rs index f331e42431..c363796b89 100644 --- a/linkerd/app/inbound/src/http/router.rs +++ b/linkerd/app/inbound/src/http/router.rs @@ -207,7 +207,7 @@ impl Inbound { .push(rt.metrics.proxy.stack.layer(stack_labels("http", "logical"))) .push_buffer("HTTP Logical", &config.http_request_buffer), ) - .push_cache(config.discovery_idle_timeout) + .push_idle_cache(config.discovery_idle_timeout) .push_on_service( svc::layers() .push(http::Retain::layer()) diff --git a/linkerd/app/outbound/src/discover.rs b/linkerd/app/outbound/src/discover.rs index 256fe5d45e..f378412d1e 100644 --- a/linkerd/app/outbound/src/discover.rs +++ b/linkerd/app/outbound/src/discover.rs @@ -60,7 +60,7 @@ impl Outbound { ) .push_buffer("TCP Server", &config.tcp_connection_buffer), ) - .push_cache(config.discovery_idle_timeout) + .push_idle_cache(config.discovery_idle_timeout) .push(svc::ArcNewService::layer()) .check_new_service::() }) diff --git a/linkerd/app/outbound/src/http/logical.rs b/linkerd/app/outbound/src/http/logical.rs index 36aab850b5..9271c6e00f 100644 --- a/linkerd/app/outbound/src/http/logical.rs +++ b/linkerd/app/outbound/src/http/logical.rs @@ -53,7 +53,7 @@ impl Outbound { .push_buffer("HTTP Logical", http_request_buffer), ) // TODO(ver) this should not be a generalized time-based evicting cache. - .push_cache(*discovery_idle_timeout); + .push_idle_cache(*discovery_idle_timeout); // If there's no route, use the logical service directly; otherwise // use the per-route stack. diff --git a/linkerd/app/outbound/src/ingress.rs b/linkerd/app/outbound/src/ingress.rs index 2b24760b63..7523a3f9b6 100644 --- a/linkerd/app/outbound/src/ingress.rs +++ b/linkerd/app/outbound/src/ingress.rs @@ -151,7 +151,7 @@ impl Outbound> { ) // Caches the profile-based stack so that it can be reused across // multiple requests to the same canonical destination. - .push_cache(*discovery_idle_timeout) + .push_idle_cache(*discovery_idle_timeout) .push_on_service( svc::layers() .push(http::strip_header::request::layer(DST_OVERRIDE_HEADER)) diff --git a/linkerd/app/outbound/src/tcp/logical.rs b/linkerd/app/outbound/src/tcp/logical.rs index d65a50e875..0950dd991e 100644 --- a/linkerd/app/outbound/src/tcp/logical.rs +++ b/linkerd/app/outbound/src/tcp/logical.rs @@ -103,7 +103,7 @@ impl Outbound { ) // TODO(ver) Can we replace this evicting cache? The detect // stack would have to hold/reuse inner stacks. - .push_cache(*discovery_idle_timeout) + .push_idle_cache(*discovery_idle_timeout) .check_new_service::() .instrument(|_: &Logical| debug_span!("tcp")) .check_new_service::()