feat: init

This commit is contained in:
zhenyi
2026-06-07 11:30:56 +08:00
commit 563381c1ca
361 changed files with 41327 additions and 0 deletions
+16
View File
@@ -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)
}
}