Cache (redis): change timeout par défaut (rafraichissement évaluations chaque heure)

This commit is contained in:
Emmanuel Viennet 2024-02-25 13:04:38 +01:00
parent 47a42d897e
commit 41944bcd29

View File

@ -67,7 +67,7 @@ class ScoDocCache:
keys are prefixed by the current departement: g.scodoc_dept MUST be set. 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 = "" prefix = ""
verbose = False # if true, verbose logging (debug) verbose = False # if true, verbose logging (debug)
@ -201,7 +201,7 @@ class AbsSemEtudCache(ScoDocCache):
""" """
prefix = "ABSE" prefix = "ABSE"
timeout = 60 * 60 # ttl 60 minutes timeout = 600 # ttl 10 minutes
class SemBulletinsPDFCache(ScoDocCache): class SemBulletinsPDFCache(ScoDocCache):
@ -233,7 +233,6 @@ class SemInscriptionsCache(ScoDocCache):
""" """
prefix = "SI" prefix = "SI"
duration = 12 * 60 * 60 # ttl 12h
class TableRecapCache(ScoDocCache): class TableRecapCache(ScoDocCache):
@ -243,7 +242,6 @@ class TableRecapCache(ScoDocCache):
""" """
prefix = "RECAP" prefix = "RECAP"
duration = 12 * 60 * 60 # ttl 12h
class TableRecapWithEvalsCache(ScoDocCache): class TableRecapWithEvalsCache(ScoDocCache):
@ -253,7 +251,6 @@ class TableRecapWithEvalsCache(ScoDocCache):
""" """
prefix = "RECAPWITHEVALS" prefix = "RECAPWITHEVALS"
duration = 12 * 60 * 60 # ttl 12h
class TableJuryCache(ScoDocCache): class TableJuryCache(ScoDocCache):
@ -263,7 +260,6 @@ class TableJuryCache(ScoDocCache):
""" """
prefix = "RECAPJURY" prefix = "RECAPJURY"
duration = 12 * 60 * 60 # ttl 12h
class TableJuryWithEvalsCache(ScoDocCache): class TableJuryWithEvalsCache(ScoDocCache):
@ -273,7 +269,6 @@ class TableJuryWithEvalsCache(ScoDocCache):
""" """
prefix = "RECAPJURYWITHEVALS" prefix = "RECAPJURYWITHEVALS"
duration = 12 * 60 * 60 # ttl 12h
def invalidate_formsemestre( # was inval_cache(formsemestre_id=None, pdfonly=False) def invalidate_formsemestre( # was inval_cache(formsemestre_id=None, pdfonly=False)