reduce length of cf cache

This commit is contained in:
Benny
2023-08-26 15:19:59 +02:00
parent 10ea445683
commit 1fcfdfca06

View File

@@ -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()