Closed xiaokaixuan closed 5 years ago
已实施
- 后端增加单独的缓存服务cacheserver,用于缓存背包数据,并加入缓存淘汰机制避免内存占用过大。
- 所有获取背包物品列表的请求由原来的查询memdb改为RPC调用缓存服务。
- 所有进程增加背包管理类BagManager,用于直接修改单个或多个物品,去除RPC到大厅操作背包。然后调用RPC同步到缓存。
- 对于特定物品触发事件或统计,由BagManager判定后用RPC通知相关进程做操作。
VSCode用户配置增加JSHint:
"jshint.options": { "esversion": 6, "node": true, "unused": true, // 变量未被使用 "-W018": true, // 忽略!(xx >= 0)警告 "-W033": true, // 忽略少分号警告 "-W069": true, // ['name']和.name互通 "-W093": true, // return a = 1;同时赋值 "-W124": true, // function* (){}缺少yield "-W004": true, // var重复声明警告 "-W083": true // 循环内定义函数 }