#NEWLINE# def clear_key_after( self , key , namespace , offset = None , timestamp = None ) : #NEWLINE# #INDENT# namespace_key = ( namespace , key ) #NEWLINE# translated_key = self . lookup_ids ( ( namespace_key , ) ) . get ( namespace_key ) #NEWLINE# execute = self . cursor . execute #NEWLINE# if ( timestamp is not None ) : #NEWLINE# #INDENT# params = ( translated_key , namespace , offset ) #NEWLINE# execute ( 'DELETE FROM gauged_data WHERE `key` = %s AND namespace = %s AND offset >= %s' , params ) #NEWLINE# execute ( 'DELETE FROM gauged_cache WHERE `key` = %s AND namespace = %s AND start + length >= %s' , params ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# params = ( translated_key , namespace ) #NEWLINE# execute ( 'DELETE FROM gauged_data WHERE `key` = %s AND namespace = %s' , params ) #NEWLINE# execute ( 'DELETE FROM gauged_keys WHERE `key` = %s AND namespace = %s' , params ) #NEWLINE# self . remove_cache ( namespace , translated_key )