#NEWLINE# def delete( self , key , version = None ) : #NEWLINE# #INDENT# key = self . make_key ( db , version = version ) #NEWLINE# self . validate_key ( key ) #NEWLINE# db = router . db_for_write ( self . cache_model_class ) #NEWLINE# table = connections [ db ] . ops . quote_name ( self . _table ) #NEWLINE# cursor = connections [ db ] . cursor ( ) #NEWLINE# cursor . execute ( ( 'DELETE FROM %s WHERE cache_key = %%s' % table ) , [ key ] ) #NEWLINE# transaction . commit_unless_managed ( using = db )