mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-12 03:48:56 +00:00
The native response-cache runtime attached through Cache._native_cache is unreachable since the V2 cache replaced it. Drop the Python branches and wrapper, the _ResponseCacheRuntime pyclass and its backend/activation/ semantic modules, the python-bridge deps only they used, and the tests and fixtures dedicated to that path. Co-authored-by: Yujong Lee <yujong@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
19 lines
517 B
Python
19 lines
517 B
Python
import threading
|
|
from collections.abc import Generator
|
|
from typing import Final
|
|
|
|
import fakeredis
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def redis_url() -> Generator[str]:
|
|
server: Final = fakeredis.TcpFakeServer(("127.0.0.1", 0), server_type="redis")
|
|
worker: Final = threading.Thread(target=server.serve_forever, daemon=True)
|
|
worker.start()
|
|
try:
|
|
yield f"redis://127.0.0.1:{server.server_address[1]}"
|
|
finally:
|
|
server.shutdown()
|
|
server.server_close()
|
|
worker.join(timeout=5)
|