Issue Bug Closed

#92145sendCacheHeaders() failed if frontenduser-session used

Sven Maciejewski 09/01/20, 09:30 updated 11/05/22, 15:16

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.