Skip to content

Commit 38c2b4a

Browse files
committed
fix readme
1 parent db562e6 commit 38c2b4a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,25 @@ package db
5555
5656
import (
5757
"github.com/gwaylib/conf"
58-
"github.com/gwaylib/errors"
5958
"github.com/gwaylib/qsql"
6059
_ "github.com/go-sql-driver/mysql"
6160
)
6261
6362
func init() {
6463
qsql.RegCacheWithIni(conf.RootDir() + "/etc/db.cfg")
6564
}
65+
66+
func GetCache(section string) *qsql.DB {
67+
return qsql.GetCache(dbFile, section)
68+
}
69+
70+
func HasCache(section string) (*qsql.DB, error) {
71+
return qsql.HasCache(dbFile, section)
72+
}
73+
74+
func CloseCache() {
75+
qsql.CloseCache()
76+
}
6677
```
6778

6879
Call a cache

0 commit comments

Comments
 (0)