diff options
author | 2022-06-03 15:02:59 +0400 | |
---|---|---|
committer | 2022-06-03 15:02:59 +0400 | |
commit | a383040cf926b78d7682f1ca2ef6b278f6d27cce (patch) | |
tree | ba36d1ff7ff6ec29f78fbb2e801791bc6adcd747 | |
parent | Use MappingProxyType For Asset Map (diff) |
Add Explicit Namespaces To Branding Caches
Signed-off-by: Hassan Abouelela <[email protected]>
-rw-r--r-- | bot/exts/backend/branding/_cog.py | 6 |
1 files 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. |