#NEWLINE# def all( self ) : #NEWLINE# #INDENT# 'Return a dictionary containing all preferences by section\n        Loaded from cache or from db in case of cold cache\n        ' #NEWLINE# a = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( not preferences_settings . ENABLE_CACHE ) : #NEWLINE# #INDENT# return self . load_from_db ( ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# for preference in self . registry . preferences ( ) : #NEWLINE# #INDENT# a [ preference . identifier ( ) ] = self . from_cache ( preference . section . name , preference . name ) #NEWLINE# #UNINDENT# #UNINDENT# except CachedValueNotFound : #NEWLINE# #INDENT# return self . load_from_db ( ) #NEWLINE# #UNINDENT# return self