LRU caches: add a generic (optional and configurable) expiration logic (#1855)
Two caches already implemented a similar mechanism: make it generic.
This commit is contained in:
@@ -2477,9 +2477,10 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) {
|
||||
if(_maliciousSHA1Path)
|
||||
ndpi_load_malicious_sha1_file(ndpi_thread_info[thread_id].workflow->ndpi_struct, _maliciousSHA1Path);
|
||||
|
||||
/* Enable/disable/configure LRU caches here */
|
||||
/* Enable/disable/configure LRU caches size here */
|
||||
ndpi_set_lru_cache_size(ndpi_thread_info[thread_id].workflow->ndpi_struct,
|
||||
NDPI_LRUCACHE_BITTORRENT, 32768);
|
||||
/* Enable/disable LRU caches TTL here */
|
||||
|
||||
ndpi_finalize_initialization(ndpi_thread_info[thread_id].workflow->ndpi_struct);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user