gametags.py:
@register.simple_tag
@cached(vary_on_args=True, locmem=True)
def games(platform=None, genre=None):
...
signals.py:
@receiver(post_save, sender=Game)
def inval_games(**kwargs):
invalidate(‘games.templatetags.gametags.games’)
http://pypi.python.org/pypi/django-cache-utils2
No comments:
Post a Comment