feat: init
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
use crate::config::AppConfig;
|
||||
use crate::error::AppResult;
|
||||
|
||||
impl AppConfig {
|
||||
pub fn lru_default_capacity(&self) -> AppResult<usize> {
|
||||
self.get_env_or("APP_LRU_DEFAULT_CAPACITY", 1000)
|
||||
}
|
||||
|
||||
pub fn lru_default_ttl_secs(&self) -> AppResult<u64> {
|
||||
self.get_env_or("APP_LRU_DEFAULT_TTL_SECS", 300)
|
||||
}
|
||||
|
||||
pub fn lru_cleanup_interval_secs(&self) -> AppResult<u64> {
|
||||
self.get_env_or("APP_LRU_CLEANUP_INTERVAL_SECS", 60)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user