From 4b7b44f0d42b9344a1c57fa0f75b65f34a7890d7 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 3 Nov 2017 13:21:35 +0100 Subject: [PATCH] wip images service --- NadekoBot.Core/Services/Impl/ImagesService.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/NadekoBot.Core/Services/Impl/ImagesService.cs b/NadekoBot.Core/Services/Impl/ImagesService.cs index 50d432a8..8c8c0128 100644 --- a/NadekoBot.Core/Services/Impl/ImagesService.cs +++ b/NadekoBot.Core/Services/Impl/ImagesService.cs @@ -9,6 +9,7 @@ namespace NadekoBot.Core.Services.Impl //todo move everything to redis public class ImagesService : IImagesService { + private readonly IDataCache _cache; private readonly Logger _log; private const string _basePath = "data/images/"; @@ -51,10 +52,14 @@ namespace NadekoBot.Core.Services.Impl public ImmutableArray Rip { get; private set; } public ImmutableArray FlowerCircle { get; private set; } - public ImagesService() + public ImagesService(IDataCache cache, int shardId) { + _cache = cache; _log = LogManager.GetCurrentClassLogger(); - this.Reload(); + if (shardId == 0) + { + this.Reload(); + } } public void Reload()