descrease net.pool ttl
This commit is contained in:
parent
291b8daf5f
commit
f0ffc9b7bf
@ -49,8 +49,8 @@ func (p *poolService) Init(a *app.App) (err error) {
|
||||
return p.dialer.Dial(ctx, id)
|
||||
},
|
||||
ocache.WithLogger(log.Sugar()),
|
||||
ocache.WithGCPeriod(time.Minute),
|
||||
ocache.WithTTL(time.Minute*5),
|
||||
ocache.WithGCPeriod(time.Minute/2),
|
||||
ocache.WithTTL(time.Minute),
|
||||
ocache.WithPrometheus(p.metricReg, "netpool", "outgoing"),
|
||||
)
|
||||
p.pool.incoming = ocache.New(
|
||||
@ -58,8 +58,8 @@ func (p *poolService) Init(a *app.App) (err error) {
|
||||
return nil, ocache.ErrNotExists
|
||||
},
|
||||
ocache.WithLogger(log.Sugar()),
|
||||
ocache.WithGCPeriod(time.Minute),
|
||||
ocache.WithTTL(time.Minute*5),
|
||||
ocache.WithGCPeriod(time.Minute/2),
|
||||
ocache.WithTTL(time.Minute),
|
||||
ocache.WithPrometheus(p.metricReg, "netpool", "incoming"),
|
||||
)
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user