add method
Add value in cache only it the element doesn't exist Returns true when element is added otherwise false
Implementation
@override
bool add(K k, V v) {
if (_cache.containsKey(k)) {
return false;
}
_cache[k] = _ManagedItem(
key: k,
value: v,
expireDuration: expireDuration,
onExpired: _expiredItem,
reloadDuration: reloadDuration,
onReload: _reloadItem,
);
return true;
}