has method
Check if key exists and is not expired
Implementation
bool has(String key) {
final cached = _cache[key];
if (cached == null) return false;
if (cached.isExpired) {
_cache.remove(key);
_accessFrequency.remove(key);
return false;
}
return true;
}