refactor(go): keep protocol realtime snapshots lightweight

This commit is contained in:
lingniu
2026-07-02 21:12:33 +08:00
parent d1e28b9e64
commit 04ca0d15d8
5 changed files with 20 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ Redis 使用 DB 50定位为实时缓存不作为历史事实来源。
| Key 族 | 用途 |
| --- | --- |
| `vehicle:latest:{vehicleKey}` | 跨协议合并后的最新核心字段快照,不重复保存完整 parsed |
| `vehicle:latest:{vehicleKey}:{protocol}` | 单协议最新快照 |
| `vehicle:latest:{vehicleKey}:{protocol}` | 单协议最新轻量快照,保留核心 fields 和时间信息,不重复保存完整 parsed |
| `vehicle:realtime-raw:{protocol}:{vehicleKey}` | 单协议最新完整 parsed 状态,是实时完整协议字段的唯一 Redis 副本 |
| `vehicle:online:{vehicleKey}` | 在线状态和 TTL |
| `vehicle:protocols:{vehicleKey}` | 当前车辆最近出现过的协议集合 |