mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
support clear_cache and cache_size methods in StringInterpolation, adjust specs
Fixes #4325
This commit is contained in:
parent
aaaa6de51a
commit
6a3e0215a3
5 changed files with 40 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
require "logstash/namespace"
|
||||
require "logstash/json"
|
||||
require "logstash/string_interpolation"
|
||||
|
||||
# transcient pipeline events for normal in-flow signaling as opposed to
|
||||
# flow altering exceptions. for now having base classes is adequate and
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# encoding: utf-8
|
||||
|
||||
module LogStash
|
||||
module StringInterpolation
|
||||
extend self
|
||||
|
||||
# clear the global compiled templates cache
|
||||
def clear_cache
|
||||
Java::ComLogstash::StringInterpolation.get_instance.clear_cache;
|
||||
end
|
||||
|
||||
# @return [Fixnum] the compiled templates cache size
|
||||
def cache_size
|
||||
Java::ComLogstash::StringInterpolation.get_instance.cache_size;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue