Function rocket_file_cache::default_priority_function [] [src]

pub fn default_priority_function(access_count: usize, size: usize) -> usize

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.