feat: on memory cache if less than 4k or specified cache size.

This commit is contained in:
Jun Kurihara 2023-08-18 18:59:28 +09:00
commit 5f6758ff9e
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23
5 changed files with 82 additions and 29 deletions

View file

@ -61,6 +61,8 @@ pub struct ProxyConfig {
pub cache_max_entry: usize,
#[cfg(feature = "cache")]
pub cache_max_each_size: usize,
#[cfg(feature = "cache")]
pub cache_max_each_size_on_memory: usize,
// All need to make packet acceptor
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
@ -105,6 +107,8 @@ impl Default for ProxyConfig {
cache_max_entry: MAX_CACHE_ENTRY,
#[cfg(feature = "cache")]
cache_max_each_size: MAX_CACHE_EACH_SIZE,
#[cfg(feature = "cache")]
cache_max_each_size_on_memory: MAX_CACHE_EACH_SIZE_ON_MEMORY,
#[cfg(any(feature = "http3-quinn", feature = "http3-s2n"))]
http3: false,