From 68afc87797e25dca30ecb8d4f2c06edcc8c71b22 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 2 Oct 2023 00:39:22 +0200 Subject: untested in-memory cache --- common/src/config.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/src/config.rs') diff --git a/common/src/config.rs b/common/src/config.rs index 467dc02..a9e3e0e 100644 --- a/common/src/config.rs +++ b/common/src/config.rs @@ -19,6 +19,7 @@ pub struct GlobalConfig { #[serde(default = "default::library_path")] pub library_path: PathBuf, #[serde(default = "default::cache_path")] pub cache_path: PathBuf, #[serde(default = "default::admin_username")] pub admin_username: String, + #[serde(default = "default::max_in_memory_cache_size")] pub max_in_memory_cache_size: usize, pub admin_password: String, #[serde(default)] pub cookie_key: Option, #[serde(default)] pub session_key: Option, @@ -37,4 +38,5 @@ mod default { pub fn database_path() -> PathBuf { "data/database".into() } pub fn library_path() -> PathBuf { "data/library".into() } pub fn cache_path() -> PathBuf { "data/cache".into() } + pub fn max_in_memory_cache_size() -> usize { 50_000_000 } } -- cgit v1.2.3-70-g09d2