Class: LogStash::PluginMixins::JdbcStreaming::RowCache
- Inherits:
-
Object
- Object
- LogStash::PluginMixins::JdbcStreaming::RowCache
- Defined in:
- lib/logstash/plugin_mixins/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.
9 10 11 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming.rb', line 9 def initialize(size, ttl) @cache = ::LruRedux::TTL::ThreadSafeCache.new(size, ttl) end |
Instance Method Details
#get(parameters) ⇒ Object
13 14 15 |
# File 'lib/logstash/plugin_mixins/jdbc_streaming.rb', line 13 def get(parameters) @cache.getset(parameters) { yield } end |