From e4dbdf98ee62f9bbf49aceaa9efbc6d160c7210c Mon Sep 17 00:00:00 2001 From: codl Date: Tue, 29 Aug 2017 09:33:25 +0200 Subject: [PATCH] reduce ttl and timeout on brotli generation recent changes (csrf tokens) have made brotli caches much less durable since each session for a same user gets a different page --- lib/brotli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/brotli.py b/lib/brotli.py index e809ad0..20f8afe 100644 --- a/lib/brotli.py +++ b/lib/brotli.py @@ -7,7 +7,7 @@ import os.path import mimetypes class BrotliCache(object): - def __init__(self, redis_kwargs={}, max_wait=0.05, expire=60*60*12): + def __init__(self, redis_kwargs={}, max_wait=0.015, expire=60*60*6): self.redis = redis.StrictRedis(**redis_kwargs) self.max_wait = max_wait self.expire = expire