diff options
author | Daniel Schadt <kingdread@gmx.de> | 2022-07-02 21:31:33 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2022-07-02 21:31:33 +0200 |
commit | 1b0f60125e304790322443dcee94ca9eba6999e4 (patch) | |
tree | a2074d1921458ba3494b89e001c7bd333eba6517 | |
parent | 426bec7f419842aac785b05de642193d99bb33f8 (diff) | |
download | fietsboek-1b0f60125e304790322443dcee94ca9eba6999e4.tar.gz fietsboek-1b0f60125e304790322443dcee94ca9eba6999e4.tar.bz2 fietsboek-1b0f60125e304790322443dcee94ca9eba6999e4.zip |
add caching to GPX and badge files
They shouldn't change that much (currently, there is not even a way to
change them from the web), and it saves a lot of data to cache the
megabytes of GPX data.
-rw-r--r-- | fietsboek/views/detail.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fietsboek/views/detail.py b/fietsboek/views/detail.py index ba7e946..7d0337a 100644 --- a/fietsboek/views/detail.py +++ b/fietsboek/views/detail.py @@ -36,7 +36,7 @@ def details(request): 'description': description, } -@view_config(route_name='gpx') +@view_config(route_name='gpx', http_cache=3600) def gpx(request): """Returns the actual GPX data from the stored track. @@ -72,7 +72,7 @@ def invalidate_share(request): return HTTPFound(request.route_url('details', id=track.id)) -@view_config(route_name='badge') +@view_config(route_name='badge', http_cache=3600) def badge(request): """Returns the image data associated with a badge. |