#NEWLINE# def SetAttributes( self , urn , attributes , to_delete , add_child_index = True , mutation_pool = None , sync = False , token = None ) : #NEWLINE# #INDENT# 'Sets the attributes in the data store and update the cache.' #NEWLINE# try : #NEWLINE# #INDENT# self . cache . ExpirePrefix ( ( utils . SmartStr ( self ) + ':' ) ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# attributes [ AFF4Object . SchemaCls . LAST ] = [ rdfvalue . RDFDatetime ( ) . Now ( ) . SerializeToDataStore ( ) ] #NEWLINE# to_delete . add ( AFF4Object . SchemaCls . LAST ) #NEWLINE# if mutation_pool : #NEWLINE# #INDENT# mutation_pool . MultiSet ( urn , attributes , replace = False , to_delete = to_delete ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# data_store . DB . MultiSet ( urn , attributes , token = token , replace = False , sync = sync , to_delete = to_delete ) #NEWLINE# #UNINDENT# if add_child_index : #NEWLINE# #INDENT# self . _UpdateChildIndex ( urn , token , mutation_pool = mutation_pool )