From 41944bcd2998a66ada9e790ac21b272866aeca80 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 25 Feb 2024 13:04:38 +0100 Subject: [PATCH] =?UTF-8?q?Cache=20(redis):=20change=20timeout=20par=20d?= =?UTF-8?q?=C3=A9faut=20(rafraichissement=20=C3=A9valuations=20chaque=20he?= =?UTF-8?q?ure)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_cache.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/scodoc/sco_cache.py b/app/scodoc/sco_cache.py index e72ee1bd1..ddb8eb3cb 100644 --- a/app/scodoc/sco_cache.py +++ b/app/scodoc/sco_cache.py @@ -67,7 +67,7 @@ class ScoDocCache: keys are prefixed by the current departement: g.scodoc_dept MUST be set. """ - timeout = None # ttl, infinite by default + timeout = 3600 # ttl, one hour by default prefix = "" verbose = False # if true, verbose logging (debug) @@ -201,7 +201,7 @@ class AbsSemEtudCache(ScoDocCache): """ prefix = "ABSE" - timeout = 60 * 60 # ttl 60 minutes + timeout = 600 # ttl 10 minutes class SemBulletinsPDFCache(ScoDocCache): @@ -233,7 +233,6 @@ class SemInscriptionsCache(ScoDocCache): """ prefix = "SI" - duration = 12 * 60 * 60 # ttl 12h class TableRecapCache(ScoDocCache): @@ -243,7 +242,6 @@ class TableRecapCache(ScoDocCache): """ prefix = "RECAP" - duration = 12 * 60 * 60 # ttl 12h class TableRecapWithEvalsCache(ScoDocCache): @@ -253,7 +251,6 @@ class TableRecapWithEvalsCache(ScoDocCache): """ prefix = "RECAPWITHEVALS" - duration = 12 * 60 * 60 # ttl 12h class TableJuryCache(ScoDocCache): @@ -263,7 +260,6 @@ class TableJuryCache(ScoDocCache): """ prefix = "RECAPJURY" - duration = 12 * 60 * 60 # ttl 12h class TableJuryWithEvalsCache(ScoDocCache): @@ -273,7 +269,6 @@ class TableJuryWithEvalsCache(ScoDocCache): """ prefix = "RECAPJURYWITHEVALS" - duration = 12 * 60 * 60 # ttl 12h def invalidate_formsemestre( # was inval_cache(formsemestre_id=None, pdfonly=False)