resources: clear cache after saving PhabricatorTask
from django.core.cache import cache
from django.dispatch import receiver, Signal
from django.db.models.signals import pre_save, post_save, post_delete
-from TWLight.resources.models import Partner
+from TWLight.resources.models import Partner, PhabricatorTask
@receiver(post_save, sender=Partner)
+@receiver(post_save, sender=PhabricatorTask)
def delete_all_cache(sender, instance, **kwargs):
- """Partner updates impact cached pages across the site, so clear all cache after saving."""
- if sender == Partner:
+ """Clear all cache after saving objects that impaced cached pages across the site."""
cache.clear()
