feat: on memory cache if less than 4k or specified cache size.

This commit is contained in:
Jun Kurihara 2023-08-18 18:59:28 +09:00
commit 5f6758ff9e
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23
5 changed files with 82 additions and 29 deletions

View file

@ -38,5 +38,8 @@ pub const MAX_CACHE_ENTRY: usize = 1_000;
#[cfg(feature = "cache")]
// max size for each file in bytes
pub const MAX_CACHE_EACH_SIZE: usize = 65_535;
#[cfg(feature = "cache")]
// on memory cache if less than or equel to
pub const MAX_CACHE_EACH_SIZE_ON_MEMORY: usize = 4_096;
// TODO: max cache size in total