put method

void put(
  1. K key,
  2. V value
)

Updates the in-memory entry and marks it dirty; the store is untouched until flush. Repeated puts to one key collapse into a single later write. Audited: 2026-06-12 11:26 EDT

Implementation

void put(K key, V value) {
  _cache[key] = value;
  _dirty.add(key);
}