diff options
| author | 2020-05-23 11:55:10 +0200 | |
|---|---|---|
| committer | 2020-05-23 11:55:10 +0200 | |
| commit | db75440a273277111e7140b1c226630b865d154b (patch) | |
| tree | 3937ae71b170efdc72f3adfd9e639de2afa30a81 | |
| parent | Better docstring for RedisCache (diff) | |
Better docstring for RedisCache.contains
| -rw-r--r-- | bot/utils/redis_cache.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/utils/redis_cache.py b/bot/utils/redis_cache.py index 26a100ef0..2b60ae0c3 100644 --- a/bot/utils/redis_cache.py +++ b/bot/utils/redis_cache.py @@ -170,7 +170,11 @@ class RedisCache: return await self._redis.hdel(self._namespace, key) async def contains(self, key: ValidRedisType) -> bool: - """Check if a key exists in the Redis cache.""" + """ + Check if a key exists in the Redis cache. + + Return True if the key exists, otherwise False. + """ await self._validate_cache() key = self._to_typestring(key) return await self._redis.hexists(self._namespace, key) |