1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

routing.py: do not cache answers marked with {"cache": False}

This commit is contained in:
Igor Chubin
2019-05-09 22:58:03 +02:00
parent 748a5af041
commit feb23ba263
+3
View File
@@ -155,6 +155,9 @@ class Router(object):
return answer
answer = self._get_page_dict(topic, request_options=request_options)
if isinstance(answer, dict):
if "cache" in answer:
cache_needed = answer["cache"]
if cache_needed and answer:
cache.put(topic, answer)