From: Michael Tremer Date: Sat, 6 Jan 2024 18:18:01 +0000 (+0000) Subject: docs: Allow browsers to cache images up to one year X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92016cb925212cf02fe400eb86cfd4d9680e7453;p=ipfire.org.git docs: Allow browsers to cache images up to one year Signed-off-by: Michael Tremer --- diff --git a/src/web/docs.py b/src/web/docs.py index e657302a..5f200b04 100644 --- a/src/web/docs.py +++ b/src/web/docs.py @@ -142,8 +142,9 @@ class FileHandler(base.BaseHandler): else: blob = file.blob - # Set expires - self.set_expires(3600) + # Allow downstream to cache this for a year + if revision: + self.set_expires(31536000) # Send the payload self._deliver_file(blob, filename=file.filename)