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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user