We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db562e6 commit 38c2b4aCopy full SHA for 38c2b4a
1 file changed
README.md
@@ -55,14 +55,25 @@ package db
55
56
import (
57
"github.com/gwaylib/conf"
58
- "github.com/gwaylib/errors"
59
"github.com/gwaylib/qsql"
60
_ "github.com/go-sql-driver/mysql"
61
)
62
63
func init() {
64
qsql.RegCacheWithIni(conf.RootDir() + "/etc/db.cfg")
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
77
```
78
79
Call a cache
0 commit comments