operator [] method
Retrieves the value associated with key.
Returns null if the key is not found. Accessing the key marks it as the most recently used item.
Implementation
@override
V? operator [](K key) {
final value = _cache.remove(key);
if (value != null) {
// Re-insert to move to the end (most recently used position)
_cache[key] = value;
}
return value;
}