logstash-plugins / logstash-filter-jdbc_streaming

A Logstash filter that can enrich events with data from a database
Apache License 2.0
12 stars 23 forks source link

Add LRU cache to this filter #3

Closed suyograo closed 7 years ago

suyograo commented 7 years ago

The current code executes the query for every event. To improve performance, we should provide an LRU cache to store the values returned after the first DB lookup. The following config should be exposed:

cache => true
cache_expiration => 5ms
cache_entries => 500

Users who don't want stale data can set the cache => false or set aggressive cache_expiration time