feat: separated feature cache

This commit is contained in:
Jun Kurihara 2023-08-18 18:15:36 +09:00
commit 32b173966c
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23
11 changed files with 76 additions and 36 deletions

View file

@ -31,3 +31,12 @@ pub mod H3 {
#[cfg(feature = "sticky-cookie")]
/// For load-balancing with sticky cookie
pub const STICKY_COOKIE_NAME: &str = "rpxy_srv_id";
#[cfg(feature = "cache")]
// # of entries in cache
pub const MAX_CACHE_ENTRY: usize = 1_000;
#[cfg(feature = "cache")]
// max size for each file in bytes
pub const MAX_CACHE_EACH_SIZE: usize = 65_535;
// TODO: max cache size in total