options.py 文件源码

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

项目:django-wechat-api 作者: crazy-canux 项目源码 文件源码
def _expire_cache(self, forward=True, reverse=True):
        # This method is usually called by apps.cache_clear(), when the
        # registry is finalized, or when a new field is added.
        properties_to_expire = []
        if forward:
            properties_to_expire.extend(self.FORWARD_PROPERTIES)
        if reverse and not self.abstract:
            properties_to_expire.extend(self.REVERSE_PROPERTIES)

        for cache_key in properties_to_expire:
            try:
                delattr(self, cache_key)
            except AttributeError:
                pass

        self._get_fields_cache = {}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号