signals.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:perdiem-django 作者: RevolutionTech 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号