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
|
# Delete cached notes and evaluations
|
||||||
NotesTableCache.delete_many(formsemestre_ids)
|
NotesTableCache.delete_many(formsemestre_ids)
|
||||||
if formsemestre_id:
|
if formsemestre_id:
|
||||||
for formsemestre_id in formsemestre_ids:
|
for fid in formsemestre_ids:
|
||||||
EvaluationCache.invalidate_sem(formsemestre_id)
|
EvaluationCache.invalidate_sem(fid)
|
||||||
|
if hasattr(g, "nt_cache") and fid in g.nt_cache:
|
||||||
|
del g.nt_cache[fid]
|
||||||
else:
|
else:
|
||||||
# optimization when we invalidate all evaluations:
|
# optimization when we invalidate all evaluations:
|
||||||
EvaluationCache.invalidate_all_sems()
|
EvaluationCache.invalidate_all_sems()
|
||||||
|
if hasattr(g, "nt_cache"):
|
||||||
|
del g.nt_cache
|
||||||
SemInscriptionsCache.delete_many(formsemestre_ids)
|
SemInscriptionsCache.delete_many(formsemestre_ids)
|
||||||
|
|
||||||
SemBulletinsPDFCache.invalidate_sems(formsemestre_ids)
|
SemBulletinsPDFCache.invalidate_sems(formsemestre_ids)
|
||||||
|
Loading…
Reference in New Issue
Block a user