Skip to content

Commit

Permalink
adding cache to submissions and submission route in backend api
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed May 19, 2024
1 parent 813bf84 commit d53932c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codeGrader/backend/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ def addSubmission() -> dict:


@app.route("/submission/<int:id_>", methods=["GET"])
@cache.memoize(config.cache_timeout, unless=cache_bypass)
@authentication
def submission(id_) -> dict:
"""
Expand All @@ -551,6 +552,7 @@ def submission(id_) -> dict:


@app.route("/submissions", methods=['GET'])
@cache.cached(config.cache_timeout, unless=cache_bypass, query_string=True)
@authentication
def submissions() -> dict:
"""
Expand Down

0 comments on commit d53932c

Please sign in to comment.