Abstract away cache. 2 implementations: redis and memory

This commit is contained in:
Kwoth
2022-06-23 13:07:45 +00:00
parent 1716c69132
commit 210da263ad
75 changed files with 11525 additions and 1547 deletions

View File

@@ -1,13 +1,13 @@
#nullable disable
namespace NadekoBot.Services;
public class LocalBotStringsProvider : IBotStringsProvider
public class MemoryBotStringsProvider : IBotStringsProvider
{
private readonly IStringsSource _source;
private IReadOnlyDictionary<string, Dictionary<string, string>> responseStrings;
private IReadOnlyDictionary<string, Dictionary<string, CommandStrings>> commandStrings;
public LocalBotStringsProvider(IStringsSource source)
public MemoryBotStringsProvider(IStringsSource source)
{
_source = source;
Reload();