Example #1
0
File: models.py Project: 0101/sctms
 def clear_cache_round(cls, round, action):
     round.clear_template_cache()
     invalidate_template_cache('rounds', round.tournament.id, None)
Example #2
0
File: models.py Project: 0101/sctms
 def clear_template_cache(self):
     invalidate_template_cache('rounds', self.tournament.id, self)
Example #3
0
File: models.py Project: 0101/sctms
 def clear_cache_competitor(cls, competitor, action):
     competitor.tournament.clear_ranking_cache()
     invalidate_template_cache('info', competitor.tournament.id)
Example #4
0
File: models.py Project: 0101/sctms
 def clear_cache_rules(cls, rules, action):
     ids = (Tournament.objects.filter(format_class=rules.format_class)
            .values_list('id'))
     if ids:
         for id in zip(*ids)[0]:
             invalidate_template_cache('info', id)
Example #5
0
File: models.py Project: 0101/sctms
 def clear_cache_tournament(cls, tournament, action):
     tournament.clear_ranking_cache()
     invalidate_template_cache('info', tournament.id)
Example #6
0
File: models.py Project: 0101/sctms
 def clear_ranking_cache(self):
     cache.delete(self._get_ranking_cache_key())
     invalidate_template_cache('players', self.id)