def lookup(self, tokens: List[int]) -> Tuple[Optional[str], int]:
"""
Given a token sequence, find the longest cached prefix.
Returns: (cache_key or None, prefix_length that matched)
If no prefix of length >= min_prefix_tokens matches, return (None, 0)
"""
pass
def insert(self, tokens: List[int], cache_key: str) -> None:
"""
Insert a new prefix into the cache.
If cache is full, evict the least-recently-used entry.
The cached prefix is tokens[0:len(tokens)] — the full sequence.
"""
pass
def get_stats(self) -> Dict[str, int]:
"""
Return: {
"total_lookups": int,
"cache_hits": int,
"total_tokens_saved": int, # sum of matched prefix lengths on hits
"evictions": int
}
"""
pass