add abstract method

void add(
  1. String key,
  2. dynamic value, {
  3. bool autoRemove = true,
  4. Duration expiration = const Duration(seconds: 60),
  5. bool listen = true,
})

Add a key/value pair to the cache, if the key is not already in the cache. Specify the duration of the cache entry (default 30 seconds).

Implementation

void add(
  String key,
  dynamic value, {
  bool autoRemove = true,
  Duration expiration = const Duration(seconds: 60),
  bool listen = true,
});