Remove 'updated' key from /all_albums, /all_tags. Was killing caching.
The cached_endpoint decorator was detecting that the response content kept changing, so it never returned 304. Oops. At the moment the client doesn't even use this key, so if we need it back we can use the etag or another http header.
This commit is contained in:
parent
1d33923601
commit
b9ad785f4d
2 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ def post_album_edit(album_id):
|
||||||
@decorators.cached_endpoint(max_age=0)
|
@decorators.cached_endpoint(max_age=0)
|
||||||
def get_all_album_names():
|
def get_all_album_names():
|
||||||
all_albums = {album.display_name: album.id for album in common.P.get_albums()}
|
all_albums = {album.display_name: album.id for album in common.P.get_albums()}
|
||||||
response = {'updated': int(time.time()), 'albums': all_albums}
|
response = {'albums': all_albums}
|
||||||
return jsonify.make_json_response(response)
|
return jsonify.make_json_response(response)
|
||||||
|
|
||||||
def get_albums_core():
|
def get_albums_core():
|
||||||
|
|
|
@ -68,7 +68,7 @@ def post_tag_remove_child(tagname):
|
||||||
def get_all_tag_names():
|
def get_all_tag_names():
|
||||||
all_tags = list(common.P.get_all_tag_names())
|
all_tags = list(common.P.get_all_tag_names())
|
||||||
all_synonyms = common.P.get_all_synonyms()
|
all_synonyms = common.P.get_all_synonyms()
|
||||||
response = {'updated': int(time.time()), 'tags': all_tags, 'synonyms': all_synonyms}
|
response = {'tags': all_tags, 'synonyms': all_synonyms}
|
||||||
return jsonify.make_json_response(response)
|
return jsonify.make_json_response(response)
|
||||||
|
|
||||||
@site.route('/tag/<specific_tag_name>')
|
@site.route('/tag/<specific_tag_name>')
|
||||||
|
|
Loading…
Reference in a new issue