changeset 1255:b1fb57e9176d

pages: don't use cache when `cache-control` header is set to `no-cache`
author Goffi <goffi@goffi.org>
date Sun, 03 May 2020 17:06:14 +0200
parents 780dbc2f4853
children 08cd652dea14
files libervia/server/pages.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/pages.py	Wed Apr 29 17:39:11 2020 +0200
+++ b/libervia/server/pages.py	Sun May 03 17:06:14 2020 +0200
@@ -977,6 +977,9 @@
             #  we are not on the final page, no need to go further
             return
 
+        if request.getHeader('cache-control') == 'no-cache':
+            return
+
         profile = self.getProfile(request) or C.SERVICE_PROFILE
 
         if cache_type == C.CACHE_PUBSUB: