fix item caching
This commit is contained in:
parent
38afcbc367
commit
e0adbcae87
5
obj.go
5
obj.go
@ -803,10 +803,15 @@ func loadObjItem() error {
|
||||
c.Code = intl_id
|
||||
c.Name = name
|
||||
c.Weight = weight
|
||||
|
||||
muxObjItem.Lock()
|
||||
cacheObjItem[intl_id] = *c
|
||||
cacheObjItem[name] = *c
|
||||
muxObjItem.Unlock()
|
||||
|
||||
muxObjItemId.Lock()
|
||||
cacheObjItemId[id] = *c
|
||||
muxObjItemId.Unlock()
|
||||
}
|
||||
|
||||
items2, err := db.Query(`SELECT oi.obj_id, oi.intl_id, obn.name, oi.weight FROM obj_item oi, obj_name obn WHERE obn.obj_id = oi.obj_id AND obn.priority > 0;`)
|
||||
|
Loading…
Reference in New Issue
Block a user