aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGustav Davidsson <[email protected]>2024-10-23 11:02:04 -0700
committerKevin Guthrie <[email protected]>2024-10-28 11:51:38 -0400
commitfedb0a72c492ed99547e3d012ba482230eb67532 (patch)
tree989949e06177e27de40638855f9b2f623d07da7d
parentfafc38ac59e9539cdfe04f21f4b1e98fa954559e (diff)
downloadpingora-fedb0a72c492ed99547e3d012ba482230eb67532.tar.gz
pingora-fedb0a72c492ed99547e3d012ba482230eb67532.zip
allow stale in cache_vary_lookup
-rw-r--r--.bleep2
-rw-r--r--pingora-cache/src/lib.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/.bleep b/.bleep
index c522314..9678016 100644
--- a/.bleep
+++ b/.bleep
@@ -1 +1 @@
-a0e0694e1a76aea46e0c9b2ba50139be20a98364 \ No newline at end of file
+68d99de4b93fec4149a15f323d03199a6e5f35ed \ No newline at end of file
diff --git a/pingora-cache/src/lib.rs b/pingora-cache/src/lib.rs
index 2aa2f7c..d484bfa 100644
--- a/pingora-cache/src/lib.rs
+++ b/pingora-cache/src/lib.rs
@@ -976,7 +976,8 @@ impl HttpCache {
/// - return false if the current meta doesn't match the variance, need to cache_lookup() again
pub fn cache_vary_lookup(&mut self, variance: HashBinary, meta: &CacheMeta) -> bool {
match self.phase {
- CachePhase::CacheKey => {
+ // Stale is allowed here because stale-> cache_lock -> lookup again
+ CachePhase::CacheKey | CachePhase::Stale => {
let inner = self.inner_mut();
// make sure that all variances found are fresher than this asset
// this is because when purging all the variance, only the primary slot is deleted