fixed NoCache method

This commit is contained in:
Lunny Xiao 2013-09-22 17:32:23 +08:00
parent 768b5bacdb
commit 894e97e195
1 changed files with 4 additions and 2 deletions

View File

@ -80,8 +80,10 @@ func (engine *Engine) SetDefaultCacher(cacher Cacher) {
} }
} }
func (engine *Engine) NoCache(bean interface{}) { func (engine *Engine) NoCache() *Session {
engine.MapCacher(bean, nil) session := engine.NewSession()
session.IsAutoClose = true
return session.NoCache()
} }
func (engine *Engine) MapCacher(bean interface{}, cacher Cacher) { func (engine *Engine) MapCacher(bean interface{}, cacher Cacher) {