mirror of
https://github.com/Findus23/RadioStats.git
synced 2024-09-19 16:03:48 +02:00
cache depending on GET parameters
This commit is contained in:
parent
5cccca6a26
commit
92acce7448
1 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ def get_dates_from_request():
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/<channel>')
|
@app.route('/api/<channel>')
|
||||||
@cache.cached(60 * 15)
|
@cache.cached(60 * 15, query_string=True)
|
||||||
def popular(channel):
|
def popular(channel):
|
||||||
date, date_type = get_dates_from_request()
|
date, date_type = get_dates_from_request()
|
||||||
start, end = get_range(date, date_type)
|
start, end = get_range(date, date_type)
|
||||||
|
@ -106,7 +106,7 @@ def popular(channel):
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/<channel>/plays/<song_id>')
|
@app.route('/api/<channel>/plays/<song_id>')
|
||||||
@cache.cached(60 * 15)
|
@cache.cached(60 * 15, query_string=True)
|
||||||
def plays(channel, song_id):
|
def plays(channel, song_id):
|
||||||
date, date_type = get_dates_from_request()
|
date, date_type = get_dates_from_request()
|
||||||
start, end = get_range(date, date_type)
|
start, end = get_range(date, date_type)
|
||||||
|
@ -120,7 +120,7 @@ def plays(channel, song_id):
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/<channel>/details/<song_id>')
|
@app.route('/api/<channel>/details/<song_id>')
|
||||||
@cache.cached(60 * 15)
|
@cache.cached(60 * 15, query_string=True)
|
||||||
def details(channel, song_id):
|
def details(channel, song_id):
|
||||||
song_get = Song.select() \
|
song_get = Song.select() \
|
||||||
.where(Song.id == song_id)
|
.where(Song.id == song_id)
|
||||||
|
|
Loading…
Reference in a new issue