2024-01-03 10:24:52 +00:00
|
|
|
mod file_location_cache;
|
|
|
|
pub mod test_util;
|
|
|
|
|
2024-07-19 03:55:18 +00:00
|
|
|
use serde::Deserialize;
|
|
|
|
|
2024-01-03 10:24:52 +00:00
|
|
|
pub use crate::file_location_cache::FileLocationCache;
|
|
|
|
|
2024-07-19 03:55:18 +00:00
|
|
|
#[derive(Clone, Copy, Debug, Deserialize)]
|
|
|
|
#[serde(default)]
|
2024-01-03 10:24:52 +00:00
|
|
|
pub struct Config {
|
|
|
|
pub max_entries_total: usize,
|
|
|
|
pub max_entries_per_file: usize,
|
|
|
|
pub entry_expiration_time_secs: u32,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for Config {
|
|
|
|
fn default() -> Self {
|
|
|
|
Config {
|
2024-09-05 02:09:29 +00:00
|
|
|
max_entries_total: 1000000,
|
2024-01-03 10:24:52 +00:00
|
|
|
max_entries_per_file: 4,
|
2024-09-05 02:09:29 +00:00
|
|
|
entry_expiration_time_secs: 86400,
|
2024-01-03 10:24:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|