smugcli/smugmug.py
def visited(self, node):
    """Record a node as just visited and clear the cache of the oldest visit.

    Args:
      node: Node object, the node object to mark as visited.
    """
    with self._mutex:
      if node in self._nodes:
        self._nodes[node][0] = self._get_next_age_index()
        heapq.heapify(self._oldest)
      else:
        new_entry = [self._get_next_age_index(), node]
        self._nodes[node] = new_entry
        heapq.heappush(self._oldest, new_entry)

        while len(self._nodes) > self._max_nodes:
          node_to_clear = heapq.heappop(self._oldest)[1]
          node_to_clear.reset_cache()
          del self._nodes[node_to_clear]
Record a node as just visited and clear the cache of the oldest visit.

    Args:
      node: Node object, the node object to mark as visited.
    
Record a node as just visited and clear the cache of the oldest visit.
Record a node as just visited and clear the cache of the oldest visit .
def visited(self, node):
    with self._mutex:
      if node in self._nodes:
        self._nodes[node][0] = self._get_next_age_index()
        heapq.heapify(self._oldest)
      else:
        new_entry = [self._get_next_age_index(), node]
        self._nodes[node] = new_entry
        heapq.heappush(self._oldest, new_entry)
        while len(self._nodes) > self._max_nodes:
          node_to_clear = heapq.heappop(self._oldest)[1]
          node_to_clear.reset_cache()
          del self._nodes[node_to_clear]
def visited ( self , node ) : with self . _mutex : if node in self . _nodes : self . _nodes [ node ] [ 0 ] = self . _get_next_age_index ( ) heapq . heapify ( self . _oldest ) else : new_entry = [ self . _get_next_age_index ( ) , node ] self . _nodes [ node ] = new_entry heapq . heappush ( self . _oldest , new_entry ) while len ( self . _nodes ) > self . _max_nodes : node_to_clear = heapq . heappop ( self . _oldest ) [ 1 ] node_to_clear . reset_cache ( ) del self . _nodes [ node_to_clear ]
Record a node as just visited and clear the cache of the oldest visit.
Record a node as just visited and clear the cache of the oldest visit .
"""Record a node as just visited and clear the cache of the oldest visit.

    Args:
      node: Node object, the node object to mark as visited.
    """
self
node
Node object, the node object to mark as visited.
Node object the node object to mark as visited .