aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKevin Guthrie <[email protected]>2024-08-07 12:46:53 -0400
committerAndrew Hauck <[email protected]>2024-08-09 14:30:49 -0700
commit24d722920a537d88e3259f026b232f2f09d1662d (patch)
tree13c5d0271179476c2d139a577fa97d5872bf5537
parent7003ac34ad514edce4b9cda235ebdb498acd93f1 (diff)
downloadpingora-24d722920a537d88e3259f026b232f2f09d1662d.tar.gz
pingora-24d722920a537d88e3259f026b232f2f09d1662d.zip
Derive `Ord` and `PartialOrd` for `CompactCacheKey`
-rw-r--r--.bleep2
-rw-r--r--pingora-cache/src/key.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/.bleep b/.bleep
index 195905d..4536067 100644
--- a/.bleep
+++ b/.bleep
@@ -1 +1 @@
-a626a70391421eb80e6cdc6c3ceb4d16f38367e8 \ No newline at end of file
+80970257fefa5cff505f63552dd2ae74372d501a \ No newline at end of file
diff --git a/pingora-cache/src/key.rs b/pingora-cache/src/key.rs
index 1c8c532..73053cd 100644
--- a/pingora-cache/src/key.rs
+++ b/pingora-cache/src/key.rs
@@ -130,7 +130,7 @@ impl CacheKey {
/// Storage optimized cache key to keep in memory or in storage
// 16 bytes + 8 bytes (+16 * u8) + user_tag.len() + 16 Bytes (Box<str>)
-#[derive(Debug, Deserialize, Serialize, Clone, Hash, PartialEq, Eq)]
+#[derive(Debug, Deserialize, Serialize, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct CompactCacheKey {
pub primary: HashBinary,
// save 8 bytes for non-variance but waste 8 bytes for variance vs, store flat 16 bytes