MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / LRUDict

Class LRUDict

pywebio/utils.py:315–325  ·  view source on GitHub ↗

Store items in the order the keys were last recent updated. The last recent updated item was in end. The last furthest updated item was in front.

Source from the content-addressed store, hash-verified

313
314
315class LRUDict(OrderedDict):
316 """
317 Store items in the order the keys were last recent updated.
318
319 The last recent updated item was in end.
320 The last furthest updated item was in front.
321 """
322
323 def __setitem__(self, key, value):
324 OrderedDict.__setitem__(self, key, value)
325 self.move_to_end(key)
326
327
328_html_value_chars = set(string.ascii_letters + string.digits + '_-')

Callers 2

_reconnect_stateClass · 0.85
HttpHandlerClass · 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…