MEDIUM: 51d: add LRU-based cache on User-Agent string detection
This cache is used by 51d converter. The input User-Agent string, the
converter args and a random seed are used as a hashing key. The cached
entries contains a pointer to the resulting string for specific
User-Agent string detection.
The cache size can be tuned using 51degrees-cache-size parameter.
diff --git a/src/haproxy.c b/src/haproxy.c
index f93502a..b0b2546 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -195,6 +195,7 @@
.data_file_path = NULL,
#ifdef FIFTYONEDEGREES_H_PATTERN_INCLUDED
.data_set = { },
+ .cache_size = 0,
#endif
},
#endif