Add a common mixin class for handling invalidation.
Review Request #15170 — Created July 15, 2026 and updated — Latest diff uploaded
Sensitive data (keys, secrets) are intended to be invalidated early,
keeping the data safe and out of memory as best as possible.This class implements this as a mixin class. It handles invalidation
when the instance falls out of scope, and allows the object to be used
as a context manager, invalidating on exit.
Unit tests pass.