Mercurial > libervia-web
comparison libervia/server/pages.py @ 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 | 6d49fae517ba |
children | 08cd652dea14 |
comparison
equal
deleted
inserted
replaced
1254:780dbc2f4853 | 1255:b1fb57e9176d |
---|---|
975 """ | 975 """ |
976 if request.postpath: | 976 if request.postpath: |
977 # we are not on the final page, no need to go further | 977 # we are not on the final page, no need to go further |
978 return | 978 return |
979 | 979 |
980 if request.getHeader('cache-control') == 'no-cache': | |
981 return | |
982 | |
980 profile = self.getProfile(request) or C.SERVICE_PROFILE | 983 profile = self.getProfile(request) or C.SERVICE_PROFILE |
981 | 984 |
982 if cache_type == C.CACHE_PUBSUB: | 985 if cache_type == C.CACHE_PUBSUB: |
983 service, node = kwargs["service"], kwargs["node"] | 986 service, node = kwargs["service"], kwargs["node"] |
984 if not node: | 987 if not node: |