Updated Services\Impl files
This commit is contained in:
parent
df56c76a89
commit
eab5344c61
2 changed files with 8 additions and 0 deletions
|
@ -191,6 +191,12 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||||
creds.Version = 7;
|
creds.Version = 7;
|
||||||
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
|
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (creds.Version <= 7)
|
||||||
|
{
|
||||||
|
creds.Version = 8;
|
||||||
|
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ using OneOf.Types;
|
||||||
using StackExchange.Redis;
|
using StackExchange.Redis;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
using YamlDotNet.Core.Tokens;
|
||||||
|
|
||||||
namespace EllieBot.Common;
|
namespace EllieBot.Common;
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ public sealed class RedisBotCache : IBotCache
|
||||||
var success = await db.StringSetAsync(key.Key,
|
var success = await db.StringSetAsync(key.Key,
|
||||||
val,
|
val,
|
||||||
expiry: expiry,
|
expiry: expiry,
|
||||||
|
keepTtl: true,
|
||||||
when: overwrite ? When.Always : When.NotExists);
|
when: overwrite ? When.Always : When.NotExists);
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|
Loading…
Reference in a new issue