#NEWLINE# @ property #NEWLINE# def query_cache( self ) : #NEWLINE# #INDENT# if ( not hasattr ( self , '_query_cache' ) ) : #NEWLINE# #INDENT# cache = { #NEWLINE# #INDENT# 'objects' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# kwargs = { #NEWLINE# #INDENT# 'url' : self . _build_api_url ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# if self . api_obj_class . base : #NEWLINE# #INDENT# kwargs [ 'base' ] = self . api_obj_class . base #NEWLINE# #UNINDENT# if obj . api_obj_class . version : #NEWLINE# #INDENT# kwargs [ 'version' ] = self . api_obj_class . version #NEWLINE# #UNINDENT# if ( ( self . namespace is not None ) and ( self . namespace is not all_ ) ) : #NEWLINE# #INDENT# kwargs [ 'namespace' ] = self . namespace #NEWLINE# #UNINDENT# r = self . api . get ( ** kwargs ) #NEWLINE# r . raise_for_status ( ) #NEWLINE# cache [ 'response' ] = r . json ( ) #NEWLINE# for obj in cache [ 'response' ] [ 'items' ] : #NEWLINE# #INDENT# cache [ 'objects' ] . append ( self . api_obj_class ( self . api , obj ) ) #NEWLINE# #UNINDENT# self . _query_cache = cache #NEWLINE# #UNINDENT# return self . _query_cache