def is_cached(self, link):
        '''Returns whether the current navigator is cached. Intended
        to be overwritten and customized by subclasses.
        '''
        if link is None:
            return False
        elif hasattr(link, 'uri'):
            return link.uri in self.id_map
        else:
            return link in self.id_map
dataset/ETHPy150Open deontologician/restnavigator/restnavigator/halnav.py/APICore.is_cached/original