From 1b98bec0abb61fb86180a13869434da8519bd261 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Wed, 18 Jan 2023 18:18:36 +0100 Subject: LRU caches: add a generic (optional and configurable) expiration logic (#1855) Two caches already implemented a similar mechanism: make it generic. --- example/ndpiReader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'example') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 33ef020f4..4e7d97ab4 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -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); -- cgit v1.2.3