#NEWLINE# def delete_session( sid = None , user = None ) : #NEWLINE# #INDENT# if ( not user ) : #NEWLINE# #INDENT# user = ( ( hasattr ( frappe . local , 'session' ) and frappe . session . user ) or 'Guest' ) #NEWLINE# #UNINDENT# frappe . cache ( ) . hdel ( 'session' , sid ) #NEWLINE# frappe . cache ( ) . hdel ( 'last_db_session_update' , sid ) #NEWLINE# frappe . db . sql ( 'delete from tabSessions where sid=%s' , sid ) #NEWLINE# frappe . db . commit ( )