Skip to content

Commit

Permalink
Merge pull request #143 from OpenPecha/chore/PECHA-117-topic_redis_ca…
Browse files Browse the repository at this point in the history
…che_clear

cache_control_update
  • Loading branch information
Lungsangg authored May 21, 2024
2 parents 6791892 + 1e310ed commit 438c7d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reader/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3199,7 +3199,7 @@ def topics_list_api(request):
topics = get_all_topics(limit)
response = [t.contents() for t in topics]
response = jsonResponse(response, callback=request.GET.get("callback", None))
response["Cache-Control"] = "max-age=3600"
response["Cache-Control"] = "max-age=0"
return response


Expand Down Expand Up @@ -3228,7 +3228,7 @@ def add_new_topic_api(request):

t.save()
clear_redis_cache()

library.build_topic_auto_completer()
library.get_topic_toc(rebuild=True)
library.get_topic_toc_json(rebuild=True)
Expand Down

0 comments on commit 438c7d6

Please sign in to comment.