set method
void
set(
- K key,
- V value
Implementation
void set(K key, V value) {
_cache.remove(key);
_cache[key] = value;
if (_cache.length > capacity) {
_cache.remove(_cache.keys.first);
}
}