Skip to content

Commit

Permalink
add cache control directives
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpaulhudson committed Nov 14, 2019
1 parent 87acb41 commit 290bbbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions holmes_extractor/examples/example_search_DE_literature.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
1 change: 1 addition & 0 deletions holmes_extractor/examples/example_search_EN_literature.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

0 comments on commit 290bbbb

Please sign in to comment.