set abstract method

Future<void> set(
  1. String key,
  2. T value, [
  3. Duration? ttl
])

Set value stored at key with optional ttl.

If a value is already stored at key, that value should be overwritten with the new value given here.

When given ttl is advisory, however, implementers should avoid returning entries that are far past their ttl.

Implementation

Future<void> set(String key, T value, [Duration? ttl]);