expire method

  1. @override
Future<void> expire(
  1. String key
)
override

Implementation

@override
Future<void> expire(String key) async {
  checkInitialized();

  int? expiry = data.remove(key);
  if (expiry == null) {
    return;
  }
  // print('Expiring $key');
  onExpire.broadcast(
    ExpirationEvent(
      target: key,
      expiry: expiry,
    ),
  );
  await persist();
}