set method

Future set(
  1. String key,
  2. String value, [
  3. String? option,
  4. dynamic optionValue,
])

Set key value to redis

await redis.set('foo', 'bar');

Implementation

Future<dynamic> set(String key, String value,
    [String? option, dynamic optionValue]) async {
  String? val =
      await sendCommand(getCommandToSetData(key, value, option, optionValue));
  if (!RedisResponse.ok(val)) {
    throw Exception(val);
  }
}