State history with an audit trail
Record every change to a value, with when, what and why
MaxCache is a thread-safe C++ cache for the history of a value. Each time the value changes it stores a record with the time, the state before, the state after, a reason and an optional detail. You can ask for the current state, the last N changes, or the changes in a time range. Changes can also be announced on the bus.
It lives in the Kevin core engine and is used there to track things like license state.
A generic template over any state type. It keeps the most recent 1,000 changes and drops the oldest. A mutex guards every call.
Read the latest value at any time without walking the history.
Fetch the last N entries, or the entries between two timestamps.
Register a callback, or publish each change to the event bus when one is available.
Track license validity changes and when they happened, with a reason for each transition.
Record device registration, firmware updates and connectivity changes across a fleet.
Entries are append-only records, so you can show how a value got to where it is.
Replay state transitions to diagnose failures. Understand the exact sequence of events leading to an issue.
Immutable state record:
History: the most recent 1,000 entries per cache
Storage: in memory only, so history does not survive a restart
Concurrency: one mutex per cache
MaxCache is part of the Kevin core engine and is not a separate download. To talk about using it, get in touch.
Copyright (c) 1998-2026 spw1.com and steven p williams All Rights Reserved