@receiver(models.signals.post_save, sender=VerificationStatus)
@receiver(models.signals.post_delete, sender=VerificationStatus)
def invalidate_verification_status_cache(sender, instance, **kwargs):
 cache_key = VerificationStatus.cache_key_name(instance.user.id, unicode(instance.checkpoint.course_id))
 cache.delete(cache_key)

@ receiver ( models . signals . post_save , sender = VerificationStatus ) @ receiver ( models . signals . post_delete , sender = VerificationStatus ) def invalidate_verification_status_cache ( sender , instance , ** kwargs ) : cache_key = VerificationStatus . cache_key_name ( instance . user . id , unicode ( instance . checkpoint . course_id ) ) cache . delete ( cache_key )
invalidate the cache of verificationstatus model .