mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 06:50:56 +00:00
orm add ResetModelCache api for test case
This commit is contained in:
parent
00a410ad1a
commit
5583fa2054
@ -98,3 +98,9 @@ func (mc *_modelCache) clean() {
|
||||
mc.cacheByFN = make(map[string]*modelInfo)
|
||||
mc.done = false
|
||||
}
|
||||
|
||||
// Clean model cache. Then you can re-RegisterModel.
|
||||
// Common use this api for test case.
|
||||
func ResetModelCache() {
|
||||
modelCache.clean()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user