From 290bbbb2ced17f3e563dd4e9da306403487e6361 Mon Sep 17 00:00:00 2001 From: Richard Hudson Date: Thu, 14 Nov 2019 21:58:01 +0100 Subject: [PATCH] add cache control directives --- holmes_extractor/examples/example_search_DE_literature.py | 1 + holmes_extractor/examples/example_search_EN_literature.py | 1 + 2 files changed, 2 insertions(+) diff --git a/holmes_extractor/examples/example_search_DE_literature.py b/holmes_extractor/examples/example_search_DE_literature.py index a593b9e..28d73a5 100644 --- a/holmes_extractor/examples/example_search_DE_literature.py +++ b/holmes_extractor/examples/example_search_DE_literature.py @@ -106,6 +106,7 @@ def on_get(self, req, resp): resp.body = \ json.dumps(holmes_manager.topic_match_documents_returning_dictionaries_against( req.params['entry'][0:200], only_one_result_per_document=True)) + resp.cache_control = ["s-maxage=31536000"] application = falcon.API() application.add_route('/german', RestHandler()) diff --git a/holmes_extractor/examples/example_search_EN_literature.py b/holmes_extractor/examples/example_search_EN_literature.py index 88ee38b..68e7002 100644 --- a/holmes_extractor/examples/example_search_EN_literature.py +++ b/holmes_extractor/examples/example_search_EN_literature.py @@ -75,6 +75,7 @@ def on_get(self, req, resp): resp.body = \ json.dumps(holmes_manager.topic_match_documents_returning_dictionaries_against( req.params['entry'][0:200])) + resp.cache_control = ["s-maxage=31536000"] application = falcon.API() application.add_route('/english', RestHandler())