Class: LogStash::Filters::JdbcStreaming::RowCache
- Inherits:
-
Object
- Object
- LogStash::Filters::JdbcStreaming::RowCache
- Defined in:
- lib/logstash/filters/jdbc_streaming.rb
Instance Method Summary collapse
- #get(parameters) ⇒ Object
-
#initialize(size, ttl) ⇒ RowCache
constructor
A new instance of RowCache.
Constructor Details
#initialize(size, ttl) ⇒ RowCache
Returns a new instance of RowCache.
53 54 55 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 53 def initialize(size, ttl) @cache = ::LruRedux::TTL::ThreadSafeCache.new(size, ttl) end |
Instance Method Details
#get(parameters) ⇒ Object
57 58 59 |
# File 'lib/logstash/filters/jdbc_streaming.rb', line 57 def get(parameters) @cache.getset(parameters) { yield } end |