Bug #92145
closedsendCacheHeaders() failed if frontenduser-session used
0%
Description
TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
in function sendCacheHeaders()
$doCache = $this->isStaticCacheble();
and in function isStaticCacheble()
comments
"There can be no logged in user because user sessions are based on a cookie and thereby does not offer client caching a chance to know if the user is logged in."
$doCache = !$this->no_cache && !$this->isINTincScript() && !$this->isUserOrGroupSet();
But "$this->isUserOrGroupSet()" doesn't check if the user is logged in.
Therefore the exist of any frontenduser-session set "isStaticCacheble()" to false and "sendCacheHeaders()" sends "Cache-Control: private, no-store".
imho the change from
$doCache = !$this->no_cache && !$this->isINTincScript() && !$this->isUserOrGroupSet();
to
$doCache = !$this->no_cache && !$this->isINTincScript() && !$this->loginUser;
can solve this problem.
Updated by Benni Mack about 2 years ago
- Status changed from New to Needs Feedback
Hey Sven,
with TYPO3 v9 (and then v10 + v11) this was improved, also checking for the user. Can you confirm that v10+ solves this problem?
Updated by Sven Maciejewski about 2 years ago
It seems solved. (tested on v10.4.31).
Updated by Benni Mack about 2 years ago
- Status changed from Needs Feedback to Closed
Thanks for the info. Will close this issue now.