plc_control/crates/plc_platform_core
caoqianming 6c8e5561dc Cache unit/equipment codes for event messages
Add MetadataCache to PlatformContext — a lazy-loaded, cross-app cache
of code fields used when formatting event messages. Each persisted
AppEvent previously did 1-2 extra SELECTs to look up the code for its
human-readable message; after this change the same id hits the cache
on all subsequent events.

Invalidation: the platform-owned equipment handler invalidates its
entry on update/delete; feeder's unit handler does the same for
units. Deletes are invalidated for hygiene only — no further events
should target a deleted id.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-22 08:21:46 +08:00
..
src Cache unit/equipment codes for event messages 2026-04-22 08:21:46 +08:00
tests refactor(core): fill PlatformContext with pool/connection/websocket 2026-04-21 09:11:03 +08:00
Cargo.toml build(workspace): add dual-app workspace manifests 2026-04-14 16:29:52 +08:00