expose session to cache_hit_filter phase

This commit is contained in:
Zaidoon Abd Al Hadi 2024-05-16 01:07:14 -04:00 committed by Edward Wang
parent cd5134431c
commit 026f483712
3 changed files with 3 additions and 7 deletions

2
.bleep
View file

@ -1 +1 @@
d44d3b13cb33c5163561923a94d62baed216767d
b0438fe62f4b4004646ca3621a0c0215c6385f6f

View file

@ -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}, {}",

View file

@ -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,