contains method
Checks whether the in-memory or the level 2 cache contains cached data
at key
.
Implementation
@override
Future<bool> contains(String key) {
return _mutex.protectRead(() async {
final bool foundInMemory = _memory.containsKey(key);
return foundInMemory ? foundInMemory : await _level2.contains(key);
});
}