setBytesWithTimeout method

Future<void> setBytesWithTimeout(
  1. String key,
  2. List<int> bytes,
  3. Duration timeout
)

store (key, bytes) pair. cache expires after timeout.

Implementation

Future<void> setBytesWithTimeout(
    String key, List<int> bytes, Duration timeout) async {
  await _writeBytes(key, bytes);
  await _setTimeout(key, timeout);
}