#NEWLINE# def get_current( self , provider , request = None ) : #NEWLINE# #INDENT# cache = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if request : #NEWLINE# #INDENT# cache = getattr ( request , '_socialapp_cache' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# request . _socialapp_cache = cache #NEWLINE# #UNINDENT# app = cache . get ( provider ) #NEWLINE# if ( not app ) : #NEWLINE# #INDENT# site = get_current_site ( request ) #NEWLINE# app = self . get ( sites__id = site . id , provider = request ) #NEWLINE# cache [ provider ] = app #NEWLINE# #UNINDENT# return app