Class: LogStash::Filters::JdbcStreaming::RowCache

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/filters/jdbc_streaming.rb

Instance Method Summary collapse

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