pull method
Retrieve an item from the cache and delete it.
- Parameters:
key: The key of the item to retrieve and delete.
- Returns: The value of the item, or
nullif not found.
Implementation
@override
Future<dynamic> pull(String key) async {
final value = await get(key);
if (value != null) {
await forget(key);
}
return value;
}