Description
Implements the two cache paths: on a miss, the event is added to the cache and marked clean; on a hit, the incoming event's timestamp is compared to the stored one and the newer value is kept, with the entry marked pending. No writes to Cassandra occur in this task- the connection to Cassandra is included in a later task.
Definition of Done
- Cache miss adds the event to the local cache and marks the entry clean (pending = false)
- Cache hit with a newer timestamp replaces the stored value and marks entry pending (pending = true)
- Cache hit with an older or equal timestamp discards the incoming event; stored value is unchanged
- Concurrent updates to the same key do not produce data races
Description
Implements the two cache paths: on a miss, the event is added to the cache and marked clean; on a hit, the incoming event's timestamp is compared to the stored one and the newer value is kept, with the entry marked pending. No writes to Cassandra occur in this task- the connection to Cassandra is included in a later task.
Definition of Done