Description
Creates the internal/cache package and defines the core data structures: the cache key type (namespace, context, event_name), the entry struct, the config struct with tunable defaults (cache max size and corresponding TTL value, scheduler time wheel size), and the CachingDBHandler struct. Implements the lookup path — given an incoming event, check whether a matching entry exists in the cache and return a hit or miss.
Definition of Done
- internal/cache/ package exists and compiles
- key, entry, Config, and CachingDBHandler types are defined
- A Lookup(key) (entry, bool) method (or equivalent) returns the correct hit/miss result
Description
Creates the internal/cache package and defines the core data structures: the cache key type (namespace, context, event_name), the entry struct, the config struct with tunable defaults (cache max size and corresponding TTL value, scheduler time wheel size), and the CachingDBHandler struct. Implements the lookup path — given an incoming event, check whether a matching entry exists in the cache and return a hit or miss.
Definition of Done