orm add ResetModelCache api for test case
Showing
1 changed file
with
6 additions
and
0 deletions
| ... | @@ -98,3 +98,9 @@ func (mc *_modelCache) clean() { | ... | @@ -98,3 +98,9 @@ func (mc *_modelCache) clean() { |
| 98 | mc.cacheByFN = make(map[string]*modelInfo) | 98 | mc.cacheByFN = make(map[string]*modelInfo) |
| 99 | mc.done = false | 99 | mc.done = false |
| 100 | } | 100 | } |
| 101 | |||
| 102 | // Clean model cache. Then you can re-RegisterModel. | ||
| 103 | // Common use this api for test case. | ||
| 104 | func ResetModelCache() { | ||
| 105 | modelCache.clean() | ||
| 106 | } | ... | ... |
-
Please register or sign in to post a comment