Class: Fluent::Plugin::RedisEnrichmentFilter::Cache
- Inherits:
-
Object
- Object
- Fluent::Plugin::RedisEnrichmentFilter::Cache
- Defined in:
- lib/fluent/plugin/filter_redis_enrichment.rb
Instance Method Summary collapse
- #getset(key, &block) ⇒ Object
-
#initialize(size: DEFAULT_CACHE_SIZE, ttl: DEFAULT_CACHE_TTL) ⇒ Cache
constructor
A new instance of Cache.
Constructor Details
#initialize(size: DEFAULT_CACHE_SIZE, ttl: DEFAULT_CACHE_TTL) ⇒ Cache
Returns a new instance of Cache.
176 177 178 179 |
# File 'lib/fluent/plugin/filter_redis_enrichment.rb', line 176 def initialize(size: DEFAULT_CACHE_SIZE, ttl: DEFAULT_CACHE_TTL) @size = size @ttl = ttl end |
Instance Method Details
#getset(key, &block) ⇒ Object
181 182 183 |
# File 'lib/fluent/plugin/filter_redis_enrichment.rb', line 181 def getset(key, &block) cache.getset(key, &block) end |