operator []= method

void operator []=(
  1. K key,
  2. V value
)

Stores a value in the cache with the given key.

Implementation

void operator []=(K key, V value) {
  final entry = CacheEntry<K, V>(
    key: key,
    value: value,
  );

  // Store immediately without eviction check for direct assignment
  _storage.put(key, entry);
}