def cache(self, link, nav):
        '''Stores a navigator in the identity map for the current
        api. Can take a link or a bare uri'''
        if link is None:
            return  # We don't cache navigators without a Link
        elif hasattr(link, 'uri'):
            self.id_map[link.uri] = nav
        else:
            self.id_map[link] = nav
def cache ( self , link , nav ) : if link is None : return elif hasattr ( link , 'uri' ) : self . id_map [ link . uri ] = nav else : self . id_map [ link ] = nav
Stores a navigator in the identity map for the current
        api. Can take a link or a bare uri