forked from ScoDoc/ScoDoc
invalidate local (request) nt cache
This commit is contained in:
parent
f00a18aeb7
commit
18b802130a
@ -260,11 +260,15 @@ def invalidate_formsemestre( # was inval_cache( context, formsemestre_id=None,
|
||||
# Delete cached notes and evaluations
|
||||
NotesTableCache.delete_many(formsemestre_ids)
|
||||
if formsemestre_id:
|
||||
for formsemestre_id in formsemestre_ids:
|
||||
EvaluationCache.invalidate_sem(formsemestre_id)
|
||||
for fid in formsemestre_ids:
|
||||
EvaluationCache.invalidate_sem(fid)
|
||||
if hasattr(g, "nt_cache") and fid in g.nt_cache:
|
||||
del g.nt_cache[fid]
|
||||
else:
|
||||
# optimization when we invalidate all evaluations:
|
||||
EvaluationCache.invalidate_all_sems()
|
||||
if hasattr(g, "nt_cache"):
|
||||
del g.nt_cache
|
||||
SemInscriptionsCache.delete_many(formsemestre_ids)
|
||||
|
||||
SemBulletinsPDFCache.invalidate_sems(formsemestre_ids)
|
||||
|
Loading…
Reference in New Issue
Block a user