diff options
author | Zaidoon Abd Al Hadi <[email protected]> | 2024-05-16 01:07:14 -0400 |
---|---|---|
committer | Edward Wang <[email protected]> | 2024-05-24 10:00:06 -0700 |
commit | 026f4837121ab8f3ce186a66eff91db2c190f16d (patch) | |
tree | 0084d732c1b3b3fc45bb2c76486b4571a65e4466 /pingora-proxy/src | |
parent | cd5134431ce8a5d4ffd781870b8e4991cadee99c (diff) | |
download | pingora-026f4837121ab8f3ce186a66eff91db2c190f16d.tar.gz pingora-026f4837121ab8f3ce186a66eff91db2c190f16d.zip |
expose session to cache_hit_filter phase
Diffstat (limited to 'pingora-proxy/src')
-rw-r--r-- | pingora-proxy/src/proxy_cache.rs | 6 | ||||
-rw-r--r-- | pingora-proxy/src/proxy_trait.rs | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/pingora-proxy/src/proxy_cache.rs b/pingora-proxy/src/proxy_cache.rs index 00b61da..1611f59 100644 --- a/pingora-proxy/src/proxy_cache.rs +++ b/pingora-proxy/src/proxy_cache.rs @@ -116,11 +116,7 @@ impl<SV> HttpProxy<SV> { // (this is a soft purge which tries to revalidate, // vs. hard purge which forces miss) // TODO: allow hard purge - match self - .inner - .cache_hit_filter(&meta, ctx, session.req_header()) - .await - { + match self.inner.cache_hit_filter(session, &meta, ctx).await { Err(e) => { error!( "Failed to filter cache hit: {e}, {}", diff --git a/pingora-proxy/src/proxy_trait.rs b/pingora-proxy/src/proxy_trait.rs index adeddd8..307280c 100644 --- a/pingora-proxy/src/proxy_trait.rs +++ b/pingora-proxy/src/proxy_trait.rs @@ -109,9 +109,9 @@ pub trait ProxyHttp { // flex purge, other filtering, returns whether asset is should be force expired or not async fn cache_hit_filter( &self, + _session: &Session, _meta: &CacheMeta, _ctx: &mut Self::CTX, - _req: &RequestHeader, ) -> Result<bool> where Self::CTX: Send + Sync, |