contains method
Checks if the cache contains an entry for the given key
.
Implementation
@override
Future<bool> contains(String key) async {
await _ensureDbOpen();
final transaction = _db!.transaction('data', 'readonly');
final store = transaction.objectStore('data');
final result = await store.getObject(key);
await transaction.completed;
return result != null;
}