Description
Connects the cache to the real Cassandra handler by wrapping DBHandlerV2 with CachingDBHandler in registrations.go and implementing the flush callback: when the timing wheel fires for a pending entry, the latest value is written to Cassandra using the event's own timestamp. This is the only PR that changes what gets written to Cassandra in the running service.
Definition of Done
- CachingDBHandler wraps the Cassandra DBHandlerV2 in registrations.go
- Cache config fields are read from config.yaml and passed through at startup
- On a timing wheel tick, all pending entries in the fired slot are flushed to Cassandra
- Flush uses the event's own timestamp so Cassandra's IF timestamp < ? guard remains effective
- A failed flush leaves the entry pending and reschedules it
- Pending state is cleared only after a confirmed successful write
- An event that arrives during a flush is not lost
- Existing v3_test.go tests continue to pass unchanged
Description
Connects the cache to the real Cassandra handler by wrapping DBHandlerV2 with CachingDBHandler in registrations.go and implementing the flush callback: when the timing wheel fires for a pending entry, the latest value is written to Cassandra using the event's own timestamp. This is the only PR that changes what gets written to Cassandra in the running service.
Definition of Done