We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zazzles2908/EX_AI-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
test_lru_cache_ttl.py•460 B
from utils.lru_cache_ttl import LruCacheTtl
import time
def test_lru_cache_ttl_basic():
c = LruCacheTtl(capacity=2, ttl_s=0.05)
c.put("a", 1)
assert c.get("a") == 1
time.sleep(0.06)
assert c.get("a") is None
def test_lru_cache_ttl_eviction():
c = LruCacheTtl(capacity=2, ttl_s=10)
c.put("a", 1)
c.put("b", 2)
c.put("c", 3)
# a should be evicted
assert c.get("a") is None and c.get("b") == 2 and c.get("c") == 3