aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-01-18 18:18:36 +0100
committerGitHub <noreply@github.com>2023-01-18 18:18:36 +0100
commit1b98bec0abb61fb86180a13869434da8519bd261 (patch)
treefce6f0e35e87b1f7027d319e5645b0907e3fde94 /example/ndpiReader.c
parentde24206adccf2347addc05d6d62b3bf743fef411 (diff)
LRU caches: add a generic (optional and configurable) expiration logic (#1855)
Two caches already implemented a similar mechanism: make it generic.
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c3
1 files changed, 2 insertions, 1 deletions
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);