implement redis key ttl
This commit is contained in:
		@@ -45,6 +45,7 @@ func (r *RedisRecorder) Ping(ctx context.Context) error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (r *RedisRecorder) Init(ctx context.Context, opts *recorders.RecorderOpts) {
 | 
			
		||||
	r.baseCtx = opts.BaseCtx
 | 
			
		||||
	r.log = zerolog.Ctx(r.baseCtx)
 | 
			
		||||
 | 
			
		||||
	if opts.AppConfig.RecorderConfig.RedisConfig == nil {
 | 
			
		||||
@@ -58,7 +59,6 @@ func (r *RedisRecorder) Init(ctx context.Context, opts *recorders.RecorderOpts)
 | 
			
		||||
	r.config = opts.AppConfig
 | 
			
		||||
	r.keep = opts.RetainLast
 | 
			
		||||
	r.RWMutex = &sync.RWMutex{}
 | 
			
		||||
	r.baseCtx = opts.BaseCtx
 | 
			
		||||
 | 
			
		||||
	keyTTL := opts.AppConfig.RecorderConfig.RedisConfig.RedisKeyTTL
 | 
			
		||||
	if keyTTL == "" {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user