Execute a cached query.
(data: QueryRequest)
| 325 | |
| 326 | @app.post("/api/data/query") |
| 327 | async def cached_query(data: QueryRequest): |
| 328 | """Execute a cached query.""" |
| 329 | try: |
| 330 | client = await get_dirty_client_async() |
| 331 | result = await client.execute_async( |
| 332 | DATA_WORKER, |
| 333 | "cached_query", |
| 334 | query_key=data.query_key, |
| 335 | ttl=data.ttl, |
| 336 | ) |
| 337 | return result |
| 338 | except DirtyError as e: |
| 339 | raise HTTPException(status_code=500, detail=str(e)) |
| 340 | |
| 341 | |
| 342 | @app.get("/api/data/stats") |
nothing calls this directly
no test coverage detected