Mercurial > libervia-web
comparison libervia/server/pages.py @ 1375:e943b0c8eec5
pages: cache is skipped if there are query arguments in URL
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 11 Dec 2020 17:35:06 +0100 |
parents | 25104d31479f |
children | 1b94a5ab155f |
comparison
equal
deleted
inserted
replaced
1374:25104d31479f | 1375:e943b0c8eec5 |
---|---|
1027 """ | 1027 """ |
1028 if request.postpath: | 1028 if request.postpath: |
1029 # we are not on the final page, no need to go further | 1029 # we are not on the final page, no need to go further |
1030 return | 1030 return |
1031 | 1031 |
1032 if request.uri != request.path: | |
1033 # we don't cache page with query arguments as there can be a lot of variants | |
1034 # influencing page results (e.g. search terms) | |
1035 log.debug("ignoring cache due to query arguments") | |
1036 | |
1032 no_cache = request.getHeader('cache-control') == 'no-cache' | 1037 no_cache = request.getHeader('cache-control') == 'no-cache' |
1033 | 1038 |
1034 profile = self.getProfile(request) or C.SERVICE_PROFILE | 1039 profile = self.getProfile(request) or C.SERVICE_PROFILE |
1035 | 1040 |
1036 if cache_type == C.CACHE_PUBSUB: | 1041 if cache_type == C.CACHE_PUBSUB: |