mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-12-26 18:15:59 +08:00
版本预发布
This commit is contained in:
8
server/internal/library/hgorm/handler/force_cache.go
Normal file
8
server/internal/library/hgorm/handler/force_cache.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package handler
|
||||
|
||||
import "github.com/gogf/gf/v2/database/gdb"
|
||||
|
||||
// ForceCache 强制缓存
|
||||
func ForceCache(m *gdb.Model) *gdb.Model {
|
||||
return m.Cache(gdb.CacheOption{Duration: -1, Force: true})
|
||||
}
|
||||
Reference in New Issue
Block a user