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

@ -2,11 +2,6 @@ pub const LISTEN_ADDRESSES_V4: &[&str] = &["0.0.0.0"];
pub const LISTEN_ADDRESSES_V6: &[&str] = &["[::]"];
pub const CONFIG_WATCH_DELAY_SECS: u32 = 20;
#[cfg(feature = "cache")]
// Cache directory
pub const CACHE_DIR: &str = "./cache";
// # of entries in cache
pub const MAX_CACHE_ENTRY: usize = 1_000;
// max size for each file in bytes
pub const MAX_CACHE_EACH_SIZE: usize = 65_535;
// TODO: max cache size in total