支持lru缓存
This commit is contained in:
parent
565375dfb7
commit
e284eebbc5
@ -62,6 +62,9 @@ func (db *PreparedStmtDB) GetDBConn() (*sql.DB, error) {
|
||||
func (db *PreparedStmtDB) Close() {
|
||||
db.Mux.Lock()
|
||||
defer db.Mux.Unlock()
|
||||
if db.Stmts == nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, stmt := range db.Stmts.AllMap() {
|
||||
go func(s *Stmt) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user