diff --git a/src/core/file_utils.rs b/src/core/file_utils.rs index ecb91a5..702a20a 100644 --- a/src/core/file_utils.rs +++ b/src/core/file_utils.rs @@ -32,7 +32,7 @@ pub struct MessageInfo { pub static TEMP_FILES_CACHE: Lazy> = Lazy::new(|| { Cache::builder() - .time_to_idle(std::time::Duration::from_secs(16)) + .time_to_idle(std::time::Duration::from_secs(5 * 60 * 60)) .max_capacity(4098) .async_eviction_listener(|_data_id, message_id, _cause| { Box::pin(async move { @@ -98,7 +98,7 @@ pub async fn download_file(chat_id: i64, message_id: i32) -> Option) -> impl IntoRes let data = match downloader { Some(v) => v.get_async_read(), - None => return StatusCode::NOT_FOUND.into_response() + None => return StatusCode::BAD_REQUEST.into_response() }; let reader = ReaderStream::new(data);