containsKey method
Checks if a key exists in the cache and is not expired.
Implementation
bool containsKey(String key) {
final entry = _cache[key];
if (entry == null) return false;
if (entry.isExpired) {
_cache.remove(key);
return false;
}
return true;
}