#NEWLINE# def get( self , key , model = False ) : #NEWLINE# #INDENT# 'Return the value of a single preference using a dotted path key' #NEWLINE# ( section , name ) = self . parse_lookup ( key ) #NEWLINE# if ( model or ( not preferences_settings . ENABLE_CACHE ) ) : #NEWLINE# #INDENT# return self . get_db_pref ( section = section , name = name ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# return self . from_cache ( section , name ) #NEWLINE# #UNINDENT# except CachedValueNotFound : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# db_pref = self . get_db_pref ( section = section , name = name ) #NEWLINE# self . to_cache ( db_pref ) #NEWLINE# return self . value