rs_zero/cache/config.rs
1use std::time::Duration;
2
3/// Cache configuration shared by cache backends.
4#[derive(Debug, Clone, PartialEq, Eq)]
5pub struct CacheConfig {
6 /// Key namespace prefix.
7 pub namespace: String,
8 /// Default entry time-to-live.
9 pub default_ttl: Duration,
10}
11
12impl Default for CacheConfig {
13 fn default() -> Self {
14 Self {
15 namespace: "rs-zero".to_string(),
16 default_ttl: Duration::from_secs(300),
17 }
18 }
19}