max size of 100k for fast cache

This commit is contained in:
Simon
2025-12-08 07:12:20 +00:00
parent b986faa1d4
commit 9789afb12b
2 changed files with 37 additions and 19 deletions

View File

@@ -49,8 +49,8 @@ async fn main() -> std::io::Result<()> {
let mut requester = util::requester::Requester::new();
requester.set_proxy(env::var("PROXY").unwrap_or("0".to_string()) != "0".to_string());
let cache: util::cache::VideoCache = crate::util::cache::VideoCache::new();
let cache: util::cache::VideoCache = crate::util::cache::VideoCache::new().max_size(100_000).to_owned();
thread::spawn(move || {
// Create a tiny runtime just for these async tasks
let rt = tokio::runtime::Builder::new_current_thread()