Files
pmomusic/pmocontrol
Eric Coissac 38bd063109 Optimize OpenHome queue operations with caching
This commit introduces caching mechanisms for track IDs in OpenHome queues to reduce redundant SOAP calls. It adds a new `CurrentTrackIdCache` struct and integrates it into `OpenHomeQueue` to cache current track information with a 250ms TTL. The `queue_snapshot` method now uses cached track IDs instead of calling `read_all_tracks()` directly, and batched metadata reads are implemented. Cache invalidation is properly handled on write operations like `seek_id`, `stop`, `delete_all`, and `clear_queue`. The `read_all_tracks` function was removed from `openhome_client.rs` as it's now superseded by the caching logic. Additionally, the `Clone` derive was removed from `InternalQueue` and `MusicQueue` structs, and `trace` was added to the tracing imports in `openhome.rs`.
2026-01-31 17:21:29 +01:00
..