aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/utils/redis_cache.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/bot/utils/redis_cache.py b/bot/utils/redis_cache.py
index de80cee84..354e987b9 100644
--- a/bot/utils/redis_cache.py
+++ b/bot/utils/redis_cache.py
@@ -100,16 +100,7 @@ class RedisCache:
def _set_namespace(self, namespace: str) -> None:
"""Try to set the namespace, but do not permit collisions."""
- # We need a unique namespace, to prevent collisions. This loop
- # will try appending underscores to the end of the namespace until
- # it finds one that is unique.
- #
- # For example, if `john` and `john_` are both taken, the namespace will
- # be `john__` at the end of this loop.
- while namespace in self._namespaces:
- namespace += "_"
-
- log.trace(f"RedisCache setting namespace to {self._namespace}")
+ log.trace(f"RedisCache setting namespace to {namespace}")
self._namespaces.append(namespace)
self._namespace = namespace