From a383040cf926b78d7682f1ca2ef6b278f6d27cce Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Fri, 3 Jun 2022 15:02:59 +0400 Subject: Add Explicit Namespaces To Branding Caches Signed-off-by: Hassan Abouelela --- bot/exts/backend/branding/_cog.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bot/exts/backend/branding/_cog.py b/bot/exts/backend/branding/_cog.py index e5781f76d..ff2704835 100644 --- a/bot/exts/backend/branding/_cog.py +++ b/bot/exts/backend/branding/_cog.py @@ -119,11 +119,9 @@ class Branding(commands.Cog): # Icons and banners in current rotation. # Keys (str) are download URLs, values (int) track the amount of times each # asset has been used in the current rotation. - _cache_icons = RedisCache() - _cache_banners = RedisCache() asset_caches = types.MappingProxyType({ - AssetType.ICON: _cache_icons, - AssetType.BANNER: _cache_banners + AssetType.ICON: RedisCache(namespace="Branding.icon_cache"), + AssetType.BANNER: RedisCache(namespace="Branding.banner_cache") }) # All available event names & durations. Cached by the daemon nightly; read by the calendar command. -- cgit v1.2.3