diff options
author | Kevin Guthrie <[email protected]> | 2024-08-07 12:46:53 -0400 |
---|---|---|
committer | Kevin Guthrie <[email protected]> | 2024-08-07 14:29:30 -0400 |
commit | 2aa7e11676db309dab760aa182626846d92c9117 (patch) | |
tree | 13c5d0271179476c2d139a577fa97d5872bf5537 | |
parent | f9ac1082ad3e43f3c2c5e5760e0c71bdd1026cd4 (diff) | |
download | pingora-2aa7e11676db309dab760aa182626846d92c9117.tar.gz pingora-2aa7e11676db309dab760aa182626846d92c9117.zip |
Derive `Ord` and `PartialOrd` for `CompactCacheKey`
-rw-r--r-- | .bleep | 2 | ||||
-rw-r--r-- | pingora-cache/src/key.rs | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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 |