local image caching to redis done?

This commit is contained in:
Master Kwoth
2017-11-05 13:28:08 +01:00
parent 4b7b44f0d4
commit 607decfbcc
17 changed files with 267 additions and 121 deletions

View File

@ -30,11 +30,11 @@ namespace NadekoBot.Modules.Administration.Services
private readonly IBotCredentials _creds;
private ImmutableArray<AsyncLazy<IDMChannel>> ownerChannels = new ImmutableArray<AsyncLazy<IDMChannel>>();
private readonly IBotConfigProvider _bc;
private readonly IImagesService _imgs;
private readonly IImageCache _imgs;
public SelfService(DiscordSocketClient client, NadekoBot bot, CommandHandler cmdHandler, DbService db,
IBotConfigProvider bc, ILocalization localization, NadekoStrings strings, IBotCredentials creds,
IDataCache cache, IImagesService imgs)
IDataCache cache)
{
_redis = cache.Redis;
_bot = bot;
@ -46,7 +46,7 @@ namespace NadekoBot.Modules.Administration.Services
_client = client;
_creds = creds;
_bc = bc;
_imgs = imgs;
_imgs = cache.LocalImages;
var sub = _redis.GetSubscriber();
sub.Subscribe(_creds.RedisKey() + "_reload_images",