disable gob register if cache is not enabled
This commit is contained in:
parent
300379e016
commit
6d9fe27a6d
|
@ -664,12 +664,14 @@ func (engine *Engine) autoMapType(v reflect.Value) *core.Table {
|
||||||
if !ok {
|
if !ok {
|
||||||
table = engine.mapType(v)
|
table = engine.mapType(v)
|
||||||
engine.Tables[t] = table
|
engine.Tables[t] = table
|
||||||
|
if engine.Cacher != nil {
|
||||||
if v.CanAddr() {
|
if v.CanAddr() {
|
||||||
engine.GobRegister(v.Addr().Interface())
|
engine.GobRegister(v.Addr().Interface())
|
||||||
} else {
|
} else {
|
||||||
engine.GobRegister(v.Interface())
|
engine.GobRegister(v.Interface())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
engine.mutex.Unlock()
|
engine.mutex.Unlock()
|
||||||
return table
|
return table
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue