Skip to content

Commit 885fa7b

Browse files
author
Mike Taylor
committed
Issue #773. Remove Flask-Cache usage from app.
1 parent 669bdad commit 885fa7b

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
Babel==1.3
22
Flask==0.10.1
3-
Flask-Cache==0.13.1
43
Flask-Limiter==0.7.4
54
Flask-SQLAlchemy==1.0
65
Flask-Uploads==0.1.3

webcompat/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
import logging
1010
import os
1111

12-
from flask.ext.cache import Cache
1312
from flask.ext.github import GitHub
1413
from flask.ext.limiter import Limiter
1514
from flask import Flask
1615

1716
app = Flask(__name__, static_url_path='')
1817
app.config.from_object('config')
1918

20-
cache = Cache(app)
2119
github = GitHub(app)
2220
limiter = Limiter(app)
2321

webcompat/api/endpoints.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919

2020
from webcompat import app
21-
from webcompat import cache
2221
from webcompat import github
2322
from webcompat import limiter
2423
from webcompat.helpers import get_comment_data
@@ -157,8 +156,6 @@ def get_search_results(query_string=None, params=None):
157156
158157
This method can take a query_string argument, to be called from other
159158
endpoints, or the query_string can be passed in via the Request object.
160-
161-
Not cached.
162159
'''
163160
params = params or request.args.copy()
164161
query_string = query_string or params.get('q')
@@ -258,12 +255,8 @@ def modify_labels(number):
258255

259256

260257
@api.route('/issues/labels')
261-
@cache.cached(timeout=600)
262258
def get_repo_labels():
263-
'''XHR endpoint to get all possible labels in a repo.
264-
265-
Cached for 10 minutes.
266-
'''
259+
'''XHR endpoint to get all possible labels in a repo.'''
267260
if g.user:
268261
request_headers = get_request_headers(g.request_headers)
269262
path = 'repos/{0}/labels'.format(REPO_PATH)

0 commit comments

Comments
 (0)