pub fn default_priority_function(access_count: usize, size: usize) -> usize {
    match usize::checked_mul((size as f64).sqrt() as usize, access_count) {
        Some(v) => v,
        None => usize::MAX,
    }
}
/// The default priority function used for determining if a file should be in the cache.
///
/// This function takes the square root of the size of the file times the number of times it has been accessed.
/// This should give some priority to bigger files, while still allowing some smaller files to enter the cache.
The default priority function used for determining if a file should be in the cache.
This function takes the square root of the size of the file times the number of times it has been accessed.
This should give some priority to bigger files, while still allowing some smaller files to enter the cache.
The default priority function used for determining if a file should be in the cache . This function takes the square root of the size of the file times the number of times it has been accessed . This should give some priority to bigger files while still allowing some smaller files to enter the cache .
pub fn default_priority_function(access_count: usize, size: usize) -> usize {
    match usize::checked_mul((size as f64).sqrt() as usize, access_count) {
        Some(v) => v,
        None => usize::MAX,
    }
}
pub fn default_priority_function ( access_count : usize , size : usize ) -> usize { match usize :: checked_mul ( ( size as f64 ) . sqrt ( ) as usize , access_count ) { Some ( v ) => v , None => usize :: MAX , } }
The default priority function used for determining if a file should be in the cache.
The default priority function used for determining if a file should be in the cache .
access_count
usize
size
usize
access_count
usize
size
usize