mirror of
https://github.com/tgbot-collection/YYeTsBot.git
synced 2025-11-26 03:44:56 +08:00
reduce length of cf cache
This commit is contained in:
@@ -130,6 +130,8 @@ class Cloudflare(Redis):
|
||||
if cache:
|
||||
cache = json.loads(cache)
|
||||
logging.info("Cache found with %s IPs", len(cache))
|
||||
if len(cache) > 10000:
|
||||
return cache[:5000]
|
||||
return cache
|
||||
else:
|
||||
data = self.session.get(self.endpoint).json()
|
||||
|
||||
Reference in New Issue
Block a user