diff options
| author | 2021-01-13 21:33:56 +0100 | |
|---|---|---|
| committer | 2021-01-14 05:01:14 +0100 | |
| commit | d972b7800346b4d1ee88c706354bb1c18ba4b725 (patch) | |
| tree | 570feb7455900ff2c990b7dc768edc81357514e0 | |
| parent | Change typehint name casing to PascalCase (diff) | |
Reuse the redis key instead of creating a new string for the expires set
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/info/doc/_redis_cache.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/bot/exts/info/doc/_redis_cache.py b/bot/exts/info/doc/_redis_cache.py index 52cb2bc94..cab51c3f1 100644 --- a/bot/exts/info/doc/_redis_cache.py +++ b/bot/exts/info/doc/_redis_cache.py @@ -27,8 +27,8 @@ class DocRedisCache(RedisObject):          needs_expire = False          with await self._get_pool_connection() as connection: -            if item.package+url_key not in self._set_expires: -                self._set_expires.add(item.package+url_key) +            if redis_key not in self._set_expires: +                self._set_expires.add(redis_key)                  needs_expire = not await connection.exists(redis_key)              await connection.hset(redis_key, item.symbol_id, value) | 
