#NEWLINE# def expand_flush_lists( self , obj_keys , flush_keys ) : #NEWLINE# #INDENT# '\n        Recursively search for flush lists and objects to invalidate.\n\n        The search starts with the lists in `keys` and expands to any flush\n        lists found therein.  Returns ({objects to flush}, {flush keys found}).\n        ' #NEWLINE# log . debug ( 'in expand_flush_lists' ) #NEWLINE# obj_keys = set ( obj_keys ) #NEWLINE# search_keys = flush_keys = set ( flush_keys ) #NEWLINE# while 1 : #NEWLINE# #INDENT# new_keys = set ( ) #NEWLINE# for key in self . get_flush_lists ( search_keys ) : #NEWLINE# #INDENT# if key . startswith ( config . FLUSH ) : #NEWLINE# #INDENT# new_keys . add ( key ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# obj_keys . add ( key ) #NEWLINE# #UNINDENT# #UNINDENT# if new_keys : #NEWLINE# #INDENT# log . debug ( ( 'search for %s found keys %s' % ( search_keys , new_keys ) ) ) #NEWLINE# flush_keys . update ( new_keys ) #NEWLINE# search_keys = new_keys #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( obj_keys , flush_keys )