pull method

  1. @override
Future pull(
  1. String key
)
override

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 null if not found.

Implementation

@override
Future<dynamic> pull(String key) async {
  final value = await get(key);
  if (value != null) {
    await forget(key);
  }
  return value;
}