MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / _oldest_entry

Method _oldest_entry

examples/server/server.py:12530–12536  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12528 pass
12529
12530 def _oldest_entry(self) -> Optional["SequenceDiskCache.Entry"]:
12531 if not self._entries_by_id:
12532 return None
12533 return min(
12534 self._entries_by_id.values(),
12535 key=lambda item: (item.last_accessed, item.size_bytes),
12536 )
12537
12538 def _evict_until(self, target_bytes: int) -> None:
12539 while self._size_bytes > target_bytes:

Callers 1

_evict_untilMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected