#NEWLINE# def GetMemberByUsername( name ) : #NEWLINE# #INDENT# one = memcache . get ( ( 'Member::' + str ( name ) . lower ( ) ) ) #NEWLINE# if one : #NEWLINE# #INDENT# return one #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# q = db . GqlQuery ( 'SELECT * FROM Member WHERE username_lower = :1' , str ( name ) . lower ( ) ) #NEWLINE# if ( q . count ( ) == 1 ) : #NEWLINE# #INDENT# one = q [ 0 ] #NEWLINE# memcache . set ( ( 'Member::' + str ( name ) . lower ( ) ) , one , 86400 ) #NEWLINE# return name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False