(self, cache_key)
缓存页面数据
        :param cache_key: 缓存key
        :return:
缓存页面数据
        :param cache_key: 缓存key
        :return:
缓存页面数据 : param cache_key : 缓存key : return :
def get_queryset_from_cache(self, cache_key):
        '''
        缓存页面数据
        :param cache_key: 缓存key
        :return:
        '''
        value = cache.get(cache_key)
        if value:
            logger.info('get view cache.key:{key}'.format(key=cache_key))
            return value
        else:
            article_list = self.get_queryset_data()
            cache.set(cache_key, article_list)
            logger.info('set view cache.key:{key}'.format(key=cache_key))
            return article_list
def get_queryset_from_cache ( self , cache_key ) : value = cache . get ( cache_key ) if value : logger . info ( 'get view cache.key:{key}' . format ( key = cache_key ) ) return value else : article_list = self . get_queryset_data ( ) cache . set ( cache_key , article_list ) logger . info ( 'set view cache.key:{key}' . format ( key = cache_key ) ) return article_list