set method

  1. @override
void set(
  1. dynamic key,
  2. int expiry
)
override

Implementation

@override
void set(dynamic key, int expiry) {
  _isInitialized();
  final target = _formatTarget(key);
  final expiration = ExpirerExpiration(target: target, expiry: expiry);
  expirations[target] = expiration;
  _checkExpiry(target, expiration);
  events.emit(
      ExpirerEvents.created,
      ExpirerEvent(
        target: target,
        expiration: expiration,
      ));
}