MCPcopy Create free account
hub / github.com/rthalley/dnspython / LRUCacheNode

Class LRUCacheNode

dns/resolver.py:504–522  ·  view source on GitHub ↗

LRUCache node.

Source from the content-addressed store, hash-verified

502
503
504class LRUCacheNode:
505 """LRUCache node."""
506
507 def __init__(self, key, value):
508 self.key = key
509 self.value = value
510 self.hits = 0
511 self.prev = self
512 self.next = self
513
514 def link_after(self, node: "LRUCacheNode") -> None:
515 self.prev = node
516 self.next = node.next
517 node.next.prev = self
518 node.next = self
519
520 def unlink(self) -> None:
521 self.next.prev = self.prev
522 self.prev.next = self.next
523
524
525class LRUCache(CacheBase):

Callers 2

__init__Method · 0.85
putMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…