Skip to content

Commit bb474a0

Browse files
authored
ref(quotas): Switch cache hasher to ahash (#5443)
1 parent 132c9ce commit bb474a0

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

relay-quotas/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ redis = ["dep:thiserror", "dep:relay-log", "relay-redis/impl"]
1717
workspace = true
1818

1919
[dependencies]
20+
ahash = { workspace = true }
2021
async-trait = { workspace = true }
2122
hashbrown = { workspace = true }
2223
papaya = { workspace = true }

relay-quotas/src/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ where
3434
///
3535
/// The cache is keyed with the individual quota, the value is the last known, currently
3636
/// consumed amount of the quota.
37-
cache: papaya::HashMap<T, CachedQuota>,
37+
cache: papaya::HashMap<T, CachedQuota, ahash::RandomState>,
3838

3939
/// The amount the cache is allowed to opportunistically over-accept based on the remaining
4040
/// quota.

0 commit comments

Comments
 (0)