root_mcp.common.cache module
Caching utilities shared between core and extended modes.
- class root_mcp.common.cache.LRUCache(max_size)[source]
Bases:
Generic[T]Generic LRU cache implementation.
- Parameters:
max_size (int)
- __init__(max_size)[source]
Initialize LRU cache.
- Parameters:
max_size (int) – Maximum number of items to cache
- get(key)[source]
Get item from cache.
- Parameters:
key (str) – Cache key
- Returns:
Cached item or None if not found
- Return type:
T | None