From feb23ba263781f5795aac0733336d18b0640131b Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Thu, 9 May 2019 22:58:03 +0200 Subject: [PATCH] routing.py: do not cache answers marked with {"cache": False} --- lib/routing.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/routing.py b/lib/routing.py index c6cbee0..e55453d 100644 --- a/lib/routing.py +++ b/lib/routing.py @@ -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)