<s> """<STR_LIT>""" <EOL> from exabgp . rib . store import Store <EOL> class RIB ( object ) : <EOL> _cache = { } <EOL> def __init__ ( self , name , adjribout , families ) : <EOL> self . name = name <EOL> if name in self . _cache : <EOL> self . incoming = self . _cache [ name ] . incoming <EOL> self . outgoing = self . _cache [ name ] . outgoing <EOL> if adjribout : <EOL> self . outgoing . resend ( None , False ) <EOL> else : <EOL> self . outgoing . clear ( ) <EOL> else : <EOL> self . incoming = Store ( families ) <EOL> self . outgoing = Store ( families ) <EOL> self . _cache [ name ] = self <EOL> self . outgoing . cache = adjribout <EOL> def reset ( self ) : <EOL> self . incoming . reset ( ) <EOL> self . outgoing . reset ( ) <EOL> def clear ( self ) : <EOL> self . _cache [ self . name ] . incoming = Store ( self . _cache [ self . name ] . incoming . families ) <EOL> self . _cache [ self . name ] . outgoing = Store ( self . _cache [ self . name ] . incoming . families ) </s>
