fix
This commit is contained in:
@@ -28,13 +28,20 @@ class Redis {
|
||||
Future<String?> get(String key) async {
|
||||
return await _command?.send_object(["GET", key]);
|
||||
}
|
||||
|
||||
Future<bool> setWithExpiry(String key, String value, int ttlInSeconds) async {
|
||||
var response = await _command
|
||||
?.send_object(["SETEX", key, ttlInSeconds.toString(), value]);
|
||||
return response == "OK";
|
||||
}
|
||||
}
|
||||
|
||||
class RedisConfig {
|
||||
String host;
|
||||
int port;
|
||||
|
||||
RedisConfig(
|
||||
{required this.host,
|
||||
this.port = 6379,});
|
||||
RedisConfig({
|
||||
required this.host,
|
||||
this.port = 6379,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user