Skip to content

Commit

Permalink
Derive Ord and PartialOrd for CompactCacheKey
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhurt authored and andrewhavck committed Aug 9, 2024
1 parent 7003ac3 commit 24d7229
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bleep
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a626a70391421eb80e6cdc6c3ceb4d16f38367e8
80970257fefa5cff505f63552dd2ae74372d501a
2 changes: 1 addition & 1 deletion pingora-cache/src/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24d7229

Please sign in to comment.