src/dazzle_back/runtime/api_cache.py¶
Generated: 2026-03-30T04:38:46.740528+00:00
Commit: 615f1354a103
Language: python
Scope: dazzle_back
Purpose¶
Async Redis cache for external API responses.
Provides cache-through with dedup locking for any external HTTP call site. Gracefully degrades to no-op when Redis is unavailable or disabled.
Cache key structure::
api_cache:{scope}:{url_hash} → JSON response
api_cache:lock:{scope}:...
Key Exports¶
ApiResponseCacheavailablegetputacquire_lockrelease_lockclose
Dependencies¶
Imports¶
hashlibjsonloggingostyping.Anyredis.asyncio
Event Interactions¶
None detected.
Invariants and Assumptions¶
No invariants documented.
Tests¶
tests/unit/test_api_cache.pytests/integration/test_runtime_e2e.pytests/integration/test_runtime_pipeline.pytests/unit/test_runtime_test_routes.pytests/unit/test_runtime_services.py
Notes¶
This page was automatically generated by tools/gen_reference_docs.py.