Update app.py
Browse files
app.py
CHANGED
@@ -326,7 +326,8 @@ async def generate_test(
|
|
326 |
return test
|
327 |
|
328 |
@app.get("/dpps/{dpp_name}", summary="Get all questions from a specific DPP", tags=["DPPs"])
|
329 |
-
|
|
|
330 |
dpp_name: str = Path(..., description="Name of the DPP file without .db extension")
|
331 |
):
|
332 |
db_path = f"dpps/{dpp_name}.db"
|
|
|
326 |
return test
|
327 |
|
328 |
@app.get("/dpps/{dpp_name}", summary="Get all questions from a specific DPP", tags=["DPPs"])
|
329 |
+
@cached(ttl=300, cache=SimpleMemoryCache, serializer=JsonSerializer())
|
330 |
+
async def get_dpp_questions(
|
331 |
dpp_name: str = Path(..., description="Name of the DPP file without .db extension")
|
332 |
):
|
333 |
db_path = f"dpps/{dpp_name}.db"
|