local image caching to redis done?
This commit is contained in:
NadekoBot.Core
Modules
Administration
Gambling
Games
Searches
Services
Xp
Services
Services
@ -29,19 +29,18 @@ namespace NadekoBot.Modules.Administration
|
||||
|
||||
private static readonly object _locker = new object();
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly IImagesService _images;
|
||||
private readonly IImageCache _images;
|
||||
private readonly IBotConfigProvider _bc;
|
||||
private readonly NadekoBot _bot;
|
||||
private readonly IBotCredentials _creds;
|
||||
private readonly IDataCache _cache;
|
||||
|
||||
public SelfCommands(DbService db, NadekoBot bot, DiscordSocketClient client,
|
||||
IImagesService images, IBotConfigProvider bc,
|
||||
IBotCredentials creds, IDataCache cache)
|
||||
IBotConfigProvider bc, IBotCredentials creds, IDataCache cache)
|
||||
{
|
||||
_db = db;
|
||||
_client = client;
|
||||
_images = images;
|
||||
_images = cache.LocalImages;
|
||||
_bc = bc;
|
||||
_bot = bot;
|
||||
_creds = creds;
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user