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