datavorous commited on
Commit
f805d2f
·
verified ·
1 Parent(s): 9eef10d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- def get_dpp_questions(
 
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"