- commit
- 6216dbf17e15c107cc22eec418c58d6e1462eb9e
- parent
- 901b5090d4e4d995221d08e95aed7342fc20c89f
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2015-02-05 17:58
cache requests
Diffstat
| M | jsonproxy/api.py | 3 | ++- |
1 files changed, 2 insertions, 1 deletions
diff --git a/jsonproxy/api.py b/jsonproxy/api.py
@@ -12,12 +12,13 @@ from flask import abort 12 12 from flask import jsonify 13 13 from flask import make_response 14 14 from flask import render_template15 -116 15 from bs4 import BeautifulSoup -1 16 import cachetools 17 17 18 18 api = Blueprint('api', __name__, static_folder='static') 19 19 20 20 -1 21 @cachetools.ttl_cache() 21 22 def urlopen(url, parse=False): 22 23 try: 23 24 current_app.logger.info('fetching %s' % url)