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:
voussoir 2021-01-05 13:05:18 -08:00
parent 1d33923601
commit b9ad785f4d
2 changed files with 2 additions and 2 deletions

View file

@ -161,7 +161,7 @@ def post_album_edit(album_id):
@decorators.cached_endpoint(max_age=0)
def get_all_album_names():
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)
def get_albums_core():

View file

@ -68,7 +68,7 @@ def post_tag_remove_child(tagname):
def get_all_tag_names():
all_tags = list(common.P.get_all_tag_names())
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)
@site.route('/tag/<specific_tag_name>')