#NEWLINE# @ db . listens_for ( db . Session , 'after_commit' ) #NEWLINE# def execute_purge( config , session ) : #NEWLINE# #INDENT# purges = session . info . pop ( 'warehouse.cache.origin.purges' , set ( ) ) #NEWLINE# try : #NEWLINE# #INDENT# cacher_factory = config . find_service_factory ( IOriginCache ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# cacher = cacher_factory ( None , config ) #NEWLINE# cacher . purge ( purges )