def clear_all_profile_contexts(sender, instance, **kwargs):
# TODO(lucas): Review to improve performance
# Instead of clearing out all of the profile contexts, we could just clear out
# the profile contexts associated with the investors related to this revenue report
cache_keys = ['profile_context-{pk}'.format(pk=up.pk) for up in UserProfile.objects.all()]
cache.delete_many(cache_keys)
评论列表
文章目录