Test with cache
10K --> 52 ms
30K --> 38 ms
100K --> 36 ms
500K --> 35 ms
1M --> 36 ms
5M --> 42 ms
10M --> 51 ms
Test direct stream
10K --> 148 ms
30K --> 132 ms
100K --> 179 ms
500K --> 425 ms
1M --> 728 ms
5M --> 4138 ms
10M --> 8525 ms
public class SendPhysicalFileCacheOptions
{
public int CacheMaximumSize { get; set; } // The maximum dedicated size in MB (i.e. the sum of all file contents)
public long FileMaximumSize { get; set; } // The maximum size of a file to be saved in cache in Bytes (so lower than CacheMaximumSize)
public IEnumerable<Func<string, long, bool>> Filters { get; set; } // Optional filters F(filePath, fileLength)->bool that allows user the reject files from cache
}