2022-01-13 17:26:25 +00:00
|
|
|
using StackExchange.Redis;
|
|
|
|
|
|
|
|
namespace PluralKit.Core;
|
|
|
|
|
|
|
|
public class RedisService
|
|
|
|
{
|
2022-02-04 19:53:56 +00:00
|
|
|
public ConnectionMultiplexer? Connection { get; set; }
|
2022-01-13 17:26:25 +00:00
|
|
|
|
|
|
|
public async Task InitAsync(CoreConfig config)
|
|
|
|
{
|
|
|
|
if (config.RedisAddr != null)
|
|
|
|
Connection = await ConnectionMultiplexer.ConnectAsync(config.RedisAddr);
|
|
|
|
}
|
|
|
|
}
|