0g-storage-node/node/file_location_cache/src/lib.rs

25 lines
534 B
Rust
Raw Normal View History

2024-01-03 10:24:52 +00:00
mod file_location_cache;
pub mod test_util;
use serde::Deserialize;
2024-01-03 10:24:52 +00:00
pub use crate::file_location_cache::FileLocationCache;
#[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 {
max_entries_total: 1000000,
2024-01-03 10:24:52 +00:00
max_entries_per_file: 4,
entry_expiration_time_secs: 86400,
2024-01-03 10:24:52 +00:00
}
}
}