mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 08:20:25 +08:00
review: 数据库实例管理调整
This commit is contained in:
@@ -104,7 +104,7 @@ func (d *mongoAppImpl) GetMongoInst(id uint64) *MongoInstance {
|
||||
var mongoCliCache = cache.NewTimedCache(consts.MongoConnExpireTime, 5*time.Second).
|
||||
WithUpdateAccessTime(true).
|
||||
OnEvicted(func(key any, value any) {
|
||||
logx.Info("删除mongo连接缓存: id = ", key)
|
||||
logx.Infof("删除mongo连接缓存: id = %s", key)
|
||||
value.(*MongoInstance).Close()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user