ttl time.Duration,
disabled bool,
opts := &cache.Options{}
opts.TTL = ttl
taggedMetricHandler := metricsHandler.WithTags(metrics.CacheTypeTag(metrics.EventsCacheTypeTagValue))
return &CacheImpl{
Cache: cache.NewWithMetrics(maxSize, opts, taggedMetricHandler),
executionManager: executionManager,
metricsHandler: taggedMetricHandler,
logger: logger,
disabled: disabled,
}
}
func (e *CacheImpl) validateKey(key EventKey) bool {