Support cache eviction for Manual Policy (#16263)
This commit is contained in:
@@ -312,6 +312,7 @@ struct Router {
|
||||
balance_rel_threshold: f32,
|
||||
eviction_interval_secs: u64,
|
||||
max_tree_size: usize,
|
||||
max_idle_secs: u64,
|
||||
max_payload_size: usize,
|
||||
dp_aware: bool,
|
||||
api_key: Option<String>,
|
||||
@@ -417,7 +418,10 @@ impl Router {
|
||||
balance_rel_threshold: self.balance_rel_threshold,
|
||||
bucket_adjust_interval_secs: self.bucket_adjust_interval_secs,
|
||||
},
|
||||
PolicyType::Manual => ConfigPolicyConfig::Manual,
|
||||
PolicyType::Manual => ConfigPolicyConfig::Manual {
|
||||
eviction_interval_secs: self.eviction_interval_secs,
|
||||
max_idle_secs: self.max_idle_secs,
|
||||
},
|
||||
PolicyType::ConsistentHashing => ConfigPolicyConfig::ConsistentHashing,
|
||||
PolicyType::PrefixHash => ConfigPolicyConfig::PrefixHash {
|
||||
prefix_token_count: 256,
|
||||
@@ -589,6 +593,7 @@ impl Router {
|
||||
balance_rel_threshold = 1.5,
|
||||
eviction_interval_secs = 120,
|
||||
max_tree_size = 2usize.pow(26),
|
||||
max_idle_secs = 14400,
|
||||
max_payload_size = 512 * 1024 * 1024,
|
||||
dp_aware = false,
|
||||
api_key = None,
|
||||
@@ -671,6 +676,7 @@ impl Router {
|
||||
balance_rel_threshold: f32,
|
||||
eviction_interval_secs: u64,
|
||||
max_tree_size: usize,
|
||||
max_idle_secs: u64,
|
||||
max_payload_size: usize,
|
||||
dp_aware: bool,
|
||||
api_key: Option<String>,
|
||||
@@ -766,6 +772,7 @@ impl Router {
|
||||
balance_rel_threshold,
|
||||
eviction_interval_secs,
|
||||
max_tree_size,
|
||||
max_idle_secs,
|
||||
max_payload_size,
|
||||
dp_aware,
|
||||
api_key,
|
||||
|
||||
Reference in New Issue
Block a user